Re: [SSI] cluster/ssi/vproc/rproc_cli_pproc.c
Brought to you by:
brucewalker,
rogertsang
From: John B. <joh...@co...> - 2001-09-10 20:44:10
|
"Kumar, Aneesh (Digital India)" wrote: > > Problem compiling the file. > > signal_struct_load_msg fucntion > > The second argument to the above function is taking a sigaction struct. > and the function is assocating the sa_restorer function to some other > variables. Unfortunately sigaction struct in alpha doesn't have a member > variable sa_restorer. After browsing through the > /usr/src/include/asm-alpha/signal.h I guess that k_sigaction struct is > the actual struct that is intended to be used in the above situation. I > am not sure but when i saw the part of the code where the above > function is getting called( it is inthe same file > cluster/ssi/vproc/rproc_cli_pproc.c ), it is using the task_struct 'sig' > member as the second argument. Further looking into the task struct > tells me that 'sig' is signal_struct which is defined as > > struct signal_struct { > atomic_t count; > struct k_sigaction action[_NSIG]; > spinlock_t siglock; > }; First, you appear to be looking at the 0.5.0 sources, as signal_struct_load_msg() doesn't exist in 0.5.1; the equivalent is k_sigaction_entry_load_msg(). Unfortunately, although the code has been changed to deal with the k_sigaction struct instead of the sigaction struct, in the i386 code the k_sigaction is simply a wrapper for a kernel-defined sigaction structure and while the name of the function has changed, the internals effectively didn't. For the alpha, the k_sigaction struct doesn't match i386 as well as the kernel sigaction struct. In this particular case, since all the addresses in the structure should be user addresses, we should be able to assume the k_sigaction is an opaque structure and copy the data. I've sent along a patch against 0.5.1 that will do this and this should be included in our next release. > > I have another doubt here how can in the user space( #ifndef __KERNEL__) > there can be two different sigaction struct for alpha and intel. ( see > the signal.h file in asm directory ).I really don't know how to go with > the above situation. Can someone help me. First, remember, for the user-level, the header in the linux sources doesn't apply; the structure seen by the application is defined by the glibc headers. Second, the sa_restorer field is defined to be obsolete and non-POSIX (at least in the man page I read); so anyone who tries to use it is not going to get any support. Anyone who tries to use the sources in the linux directory is probably trying to look into kernel memory directly. > > -aneesh |