Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/freebsd32/freebsd32_misc.c
Show First 20 Lines • Show All 2,471 Lines • ▼ Show 20 Lines | siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst) | ||||
dst->si_uid = src->si_uid; | dst->si_uid = src->si_uid; | ||||
dst->si_status = src->si_status; | dst->si_status = src->si_status; | ||||
dst->si_addr = (uintptr_t)src->si_addr; | dst->si_addr = (uintptr_t)src->si_addr; | ||||
dst->si_value.sival_int = src->si_value.sival_int; | dst->si_value.sival_int = src->si_value.sival_int; | ||||
dst->si_timerid = src->si_timerid; | dst->si_timerid = src->si_timerid; | ||||
dst->si_overrun = src->si_overrun; | dst->si_overrun = src->si_overrun; | ||||
} | } | ||||
#ifndef _FREEBSD32_SYSPROTO_H_ | |||||
struct freebsd32_sigqueue_args { | |||||
pid_t pid; | |||||
int signum; | |||||
/* union sigval32 */ int value; | |||||
}; | |||||
#endif | |||||
int | |||||
freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) | |||||
{ | |||||
union sigval sv; | |||||
/* | |||||
* On 32-bit ABIs, sival_int and sival_ptr are the same. | |||||
* On 64-bit little-endian ABIs, the low bits are the same. | |||||
* In 64-bit big-endian ABIs, sival_int overlaps with | |||||
* sival_ptr's HIGH bits. We choose to support sival_int | |||||
* rather than sival_ptr in this case as it seems to be | |||||
* more common. | |||||
*/ | |||||
bzero(&sv, sizeof(sv)); | |||||
sv.sival_int = uap->value; | |||||
return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); | |||||
} | |||||
int | int | ||||
freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *uap) | freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *uap) | ||||
{ | { | ||||
struct timespec32 ts32; | struct timespec32 ts32; | ||||
struct timespec ts; | struct timespec ts; | ||||
struct timespec *timeout; | struct timespec *timeout; | ||||
sigset_t set; | sigset_t set; | ||||
ksiginfo_t ksi; | ksiginfo_t ksi; | ||||
▲ Show 20 Lines • Show All 640 Lines • Show Last 20 Lines |