From: "Teemu Nätkinniemi" <stinkf42@yahoo.com>
To: Sebastian Herbszt <herbszt@gmx.de>
Cc: aliguori@us.ibm.com, mtosatti@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Threads and win32
Date: Tue, 21 Jul 2009 06:22:41 -0700 (PDT) [thread overview]
Message-ID: <655127.18217.qm@web30607.mail.mud.yahoo.com> (raw)
In-Reply-To: <E024B6C880944EB4A5E8C2399F5EA5BC@FSCPC>
> > Do the signal warnings make any sense??
>
> CC i386-softmmu/vl.o
> vl.c: In function `qemu_cpu_kick':
> vl.c:3842: error: `SIGUSR1' undeclared (first use in this
> function)
> vl.c:3842: error: (Each undeclared identifier is reported
> only once
> vl.c:3842: error: for each function it appears in.)
> vl.c: In function `block_io_signals':
> vl.c:3859: error: storage size of 'sigact' isn't known
> vl.c:3861: warning: implicit declaration of function
> `sigemptyset'
> vl.c:3862: warning: implicit declaration of function
> `sigaddset'
> vl.c:3862: error: `SIGUSR2' undeclared (first use in this
> function)
> vl.c:3863: error: `SIGIO' undeclared (first use in this
> function)
> vl.c:3864: error: `SIGALRM' undeclared (first use in this
> function)
> vl.c:3865: warning: implicit declaration of function
> `pthread_sigmask'
> vl.c:3868: error: `SIGUSR1' undeclared (first use in this
> function)
> vl.c:3873: warning: implicit declaration of function
> `sigaction'
> vl.c:3859: warning: unused variable `sigact'
> vl.c: In function `unblock_io_signals':
> vl.c:3861: warning: redundant redeclaration of
> 'sigemptyset'
> vl.c:3861: warning: previous implicit declaration of
> 'sigemptyset' was here
> vl.c:3862: warning: redundant redeclaration of 'sigaddset'
> vl.c:3862: warning: previous implicit declaration of
> 'sigaddset' was here
> vl.c:3881: error: `SIGUSR2' undeclared (first use in this
> function)
> vl.c:3882: error: `SIGIO' undeclared (first use in this
> function)
> vl.c:3883: error: `SIGALRM' undeclared (first use in this
> function)
> vl.c:3865: warning: redundant redeclaration of
> 'pthread_sigmask'
> vl.c:3865: warning: previous implicit declaration of
> 'pthread_sigmask' was here
> vl.c:3887: error: `SIGUSR1' undeclared (first use in this
> function)
> vl.c: In function `qemu_signal_lock':
> vl.c:3896: error: `SIGUSR1' undeclared (first use in this
> function)
> vl.c: In function `pause_all_vcpus':
> vl.c:3937: error: `SIGUSR1' undeclared (first use in this
> function)
> vl.c: In function `resume_all_vcpus':
> vl.c:3959: error: `SIGUSR1' undeclared (first use in this
> function)
> make[1]: *** [vl.o] Error 1
> make: *** [subdir-i386-softmmu] Error 2
MinGW's signal support is very limited and it does not have these signals. One solution would be to use GnuWin32 support library (http://gnuwin32.sourceforge.net/) but I encounter following errors:
In file included from /mingw/lib/gcc/mingw32/../../../include/winx/signalx.h:5,
from D:/msys/src/qemu/vl.c:27:
/mingw/lib/gcc/mingw32/../../../include/winx/sys/signalx.h:57: error: expected specifier-qualifier-list before '__sigset_t'
/mingw/lib/gcc/mingw32/../../../include/winx/sys/signalx.h:64: error: expected specifier-qualifier-list before '__ptr_t'
/mingw/lib/gcc/mingw32/../../../include/winx/sys/signalx.h:72: error: expected specifier-qualifier-list before '__ptr_t'
D:/msys/src/qemu/vl.c: In function 'block_io_signals':
D:/msys/src/qemu/vl.c:3865: warning: implicit declaration of function 'sigaddset'
D:/msys/src/qemu/vl.c:3868: warning: implicit declaration of function 'pthread_sigmask'
D:/msys/src/qemu/vl.c:3876: warning: implicit declaration of function 'sigaction'
D:/msys/src/qemu/vl.c: In function 'qemu_uuid_parse':
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: unknown conversion type character 'h' in format
D:/msys/src/qemu/vl.c:4664: warning: too many arguments for format
make[1]: *** [vl.o] Error 1
make: *** [subdir-i386-softmmu] Error 2
The actual include file winx/sys/signalx.h looks like this:
#ifndef __WINX_SYS_SIGNALX_H__
#define __WINX_SYS_SIGNALX_H__
#include <features.h>
#include <sys/types.h>
#include <bits/sigset.h>
/* Type of a signal handler. */
typedef void (*__sighandler_t) (int);
#ifdef __USE_BSD
typedef __sighandler_t sig_t;
#endif
# define SIGHUP -1
# define SIGQUIT -3
# define SIGTRAP -5
# define SIGIOT -6
# define SIGEMT -7
# define SIGKILL -9
# define SIGBUS -10
# define SIGSYS -12
# define SIGPIPE -13
# define SIGALRM -14
# define SIGURG -16
# define SIGSTOP -17
# define SIGTSTP -18
# define SIGCONT -19
# define SIGCHLD -20
# define SIGTTIN -21
# define SIGTTOU -22
# define SIGIO -23
# define SIGXCPU -24
# define SIGXFSZ -25
# define SIGVTALRM -26
# define SIGPROF -27
# define SIGWINCH -28
# define SIGLOST -29
# define SIGUSR1 -30
# define SIGUSR2 -32
#define SIG_SETMASK 0 /* set mask with sigprocmask() */
#define SIG_BLOCK 1 /* set of signals to block */
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
/* Type of a signal handler. */
typedef void (*__sighandler_t) (int);
struct sigaction
{
/* Signal handler. */
__sighandler_t sa_handler;
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
/* Special flags. */
int sa_flags;
};
/* Structure describing a signal stack (obsolete). */
struct sigstack
{
__ptr_t ss_sp; /* Signal stack pointer. */
int ss_onstack; /* Nonzero if executing on this stack. */
};
/* Alternate, preferred interface. */
typedef struct sigaltstack
{
__ptr_t ss_sp;
size_t ss_size;
int ss_flags;
} stack_t;
/* POSIX sigsetjmp/siglongjmp macros */
#define sigjmp_buf jmp_buf
#define _SAVEMASK _JBLEN
#define _SIGMASK (_JBLEN+1)
/*
#define sigsetjmp(env, savemask) ((env)[_SAVEMASK] = savemask,\
sigprocmask (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\
setjmp (env))
#define siglongjmp(env, val) ((((env)[_SAVEMASK])?\
sigprocmask (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 0):0),\
longjmp (env, val))
#define sigsetjmp(env, savemask) (1)
#define siglongjmp(env, val) (1)
*/
#ifndef sigemptyset
# define sigemptyset(s) (*(s) = 0)
#endif
#ifndef sigmask
# define sigmask(sig) (1 << ((sig) - 1))
#endif
/* # define sigaddset(s, sig) (*(s) |= sigmask (sig)) */
#endif /* __WINX_SYS_SIGNALX_H__ */
Teemu
prev parent reply other threads:[~2009-07-21 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-18 19:27 [Qemu-devel] Threads and win32 Teemu Nätkinniemi
2009-07-19 12:11 ` [Qemu-devel] " Sebastian Herbszt
2009-07-20 16:07 ` Marcelo Tosatti
2009-07-20 19:09 ` Sebastian Herbszt
2009-07-20 23:52 ` Marcelo Tosatti
2009-07-21 12:11 ` Sebastian Herbszt
2009-07-21 12:58 ` Jamie Lokier
2009-07-21 13:22 ` Teemu Nätkinniemi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=655127.18217.qm@web30607.mail.mud.yahoo.com \
--to=stinkf42@yahoo.com \
--cc=aliguori@us.ibm.com \
--cc=herbszt@gmx.de \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.