[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Posix timer syscalls [Bug 1042388]
From: |
Erik de Castro Lopo |
Subject: |
[Qemu-devel] Posix timer syscalls [Bug 1042388] |
Date: |
Wed, 29 Aug 2012 19:44:30 +1000 |
Hi all,
I've spent some time messing about in linux-user/syscall.c and I have
stubs for all 5 posix timer syscalls:
int timer_create(clockid_t clockid, struct sigevent *sevp,
timer_t *timerid);
int timer_settime(timer_t timerid, int flags,
const struct itimerspec *new_value,
struct itimerspec * old_value);
int timer_gettime(timer_t timerid, struct itimerspec *curr_value);
int timer_getoverrun(timer_t timerid);
int timer_delete(timer_t timerid);
Obviously all these parameters need to be converted between host and
target. I've already found struct target_itimerspec in
linux-user/syscall_defs.h and that looks like it will be useful.
I'm having trouble struct sigevent pointer that is passed to
timer_create() which is defined as:
typedef struct sigevent {
sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
union {
int _pad[SIGEV_PAD_SIZE];
int _tid;
struct {
void (*_function)(sigval_t);
void *_attribute; /* really pthread_attr_t */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
Any ideas on how to handle the union within this struct?
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
- [Qemu-devel] Posix timer syscalls [Bug 1042388],
Erik de Castro Lopo <=