qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Posix timer syscalls [Bug 1042388]
@ 2012-08-29  9:44 Erik de Castro Lopo
  2012-08-29  9:57 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Erik de Castro Lopo @ 2012-08-29  9:44 UTC (permalink / raw)
  To: qemu-devel

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-29 10:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29  9:44 [Qemu-devel] Posix timer syscalls [Bug 1042388] Erik de Castro Lopo
2012-08-29  9:57 ` Peter Maydell
2012-08-29 10:03   ` Erik de Castro Lopo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).