From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6epH-0002BE-BF for qemu-devel@nongnu.org; Wed, 29 Aug 2012 05:44:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6epB-0008Bu-DJ for qemu-devel@nongnu.org; Wed, 29 Aug 2012 05:44:43 -0400 Received: from hendrix.mega-nerd.net ([203.206.230.162]:57699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6epB-0008BN-19 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 05:44:37 -0400 Received: from hendrix (hendrix [192.168.200.99]) by hendrix.mega-nerd.net (Postfix) with SMTP id 25051106ECF for ; Wed, 29 Aug 2012 19:44:30 +1000 (EST) Date: Wed, 29 Aug 2012 19:44:30 +1000 From: Erik de Castro Lopo Message-Id: <20120829194430.0cec30cc66e47d679a4bc8c9@mega-nerd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Posix timer syscalls [Bug 1042388] Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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/