Ejemplo n.º 1
0
    SYSCALL_INIT_HELPER(msgsys),
    SYSCALL_INIT_HELPER_COMPAT(freebsd7_msgctl),
#endif
    SYSCALL_INIT_LAST
};

#ifdef COMPAT_FREEBSD32
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_ipc.h>
#include <compat/freebsd32/freebsd32_proto.h>
#include <compat/freebsd32/freebsd32_signal.h>
#include <compat/freebsd32/freebsd32_syscall.h>
#include <compat/freebsd32/freebsd32_util.h>

static struct syscall_helper_data msg32_syscalls[] = {
    SYSCALL32_INIT_HELPER(freebsd32_msgctl),
    SYSCALL32_INIT_HELPER(freebsd32_msgsnd),
    SYSCALL32_INIT_HELPER(freebsd32_msgrcv),
    SYSCALL32_INIT_HELPER_COMPAT(msgget),
    SYSCALL32_INIT_HELPER(freebsd32_msgsys),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
    defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
    SYSCALL32_INIT_HELPER(freebsd7_freebsd32_msgctl),
#endif
    SYSCALL_INIT_LAST
};
#endif

static int
msginit()
{
Ejemplo n.º 2
0
		ts = NULL;
	else {
		error = copyin(uap->abstime, &abstime32, sizeof(abstime32));
		if (error != 0)
			return (error);
		CP(abstime32, abstime, tv_sec);
		CP(abstime32, abstime, tv_nsec);
		if (abstime.tv_nsec >= 1000000000 || abstime.tv_nsec < 0)
			return (EINVAL);
		ts = &abstime;
	}
	return (kern_sem_wait(td, uap->id, 0, ts));
}

static struct syscall_helper_data ksem32_syscalls[] = {
	SYSCALL32_INIT_HELPER(freebsd32_ksem_init),
	SYSCALL32_INIT_HELPER(freebsd32_ksem_open),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_unlink),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_close),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_post),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_wait),
	SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_trywait),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_getvalue),
	SYSCALL32_INIT_HELPER_COMPAT(ksem_destroy),
	SYSCALL_INIT_LAST
};
#endif

static int
ksem_module_init(void)
Ejemplo n.º 3
0
		ts = NULL;
	else {
		error = copyin(uap->abstime, &abstime32, sizeof(abstime32));
		if (error != 0)
			return (error);
		CP(abstime32, abstime, tv_sec);
		CP(abstime32, abstime, tv_nsec);
		if (abstime.tv_nsec >= 1000000000 || abstime.tv_nsec < 0)
			return (EINVAL);
		ts = &abstime;
	}
	return (kern_sem_wait(td, uap->id, 0, ts));
}

static struct syscall_helper_data ksem32_syscalls[] = {
	SYSCALL32_INIT_HELPER(freebsd32_ksem_init),
	SYSCALL32_INIT_HELPER(freebsd32_ksem_open),
	SYSCALL32_INIT_HELPER(ksem_unlink),
	SYSCALL32_INIT_HELPER(ksem_close),
	SYSCALL32_INIT_HELPER(ksem_post),
	SYSCALL32_INIT_HELPER(ksem_wait),
	SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait),
	SYSCALL32_INIT_HELPER(ksem_trywait),
	SYSCALL32_INIT_HELPER(ksem_getvalue),
	SYSCALL32_INIT_HELPER(ksem_destroy),
	SYSCALL_INIT_LAST
};
#endif

static int
ksem_module_init(void)