diff options
author | jbj <devnull@localhost> | 2003-03-19 03:00:02 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-03-19 03:00:02 +0000 |
commit | 6cb657b9d27bc6cd861a721d5284486a52993310 (patch) | |
tree | 1b36fccb0a4e3fe8d5b772c796dbf64876f30930 /rpmio/rpmsq.h | |
parent | d2a425e0158a0dced5bf199f229924890067c563 (diff) | |
download | rpm-6cb657b9d27bc6cd861a721d5284486a52993310.tar.gz rpm-6cb657b9d27bc6cd861a721d5284486a52993310.tar.bz2 rpm-6cb657b9d27bc6cd861a721d5284486a52993310.zip |
Sanity.
CVS patchset: 6705
CVS date: 2003/03/19 03:00:02
Diffstat (limited to 'rpmio/rpmsq.h')
-rw-r--r-- | rpmio/rpmsq.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/rpmio/rpmsq.h b/rpmio/rpmsq.h index 9e3960ebc..a1498602a 100644 --- a/rpmio/rpmsq.h +++ b/rpmio/rpmsq.h @@ -15,6 +15,9 @@ typedef struct rpmsig_s * rpmsig; typedef struct rpmsqElem * rpmsq; +typedef void (*rpmsqAction_t) (int signum, siginfo_t *info, void *context) + /*@*/; + /*@-redecl@*/ /*@unchecked@*/ extern int _rpmsq_debug; @@ -30,6 +33,7 @@ struct rpmsqElem { volatile pid_t reaped; /*!< Reaped waitpid(3) return. */ volatile int status; /*!< Reaped waitpid(3) status. */ int reaper; /*!< Register SIGCHLD handler? */ + int pipes[2]; void * id; /*!< Blocking thread id (pthread_t). */ pthread_mutex_t mutex; pthread_cond_t cond; @@ -58,17 +62,17 @@ int rpmsqRemove(/*@null@*/ void * elem) /** */ -void rpmsqHandler(int signum) +void rpmsqAction(int signum, siginfo_t * info, void * context) /*@globals rpmsqCaught, fileSystem @*/ /*@modifies rpmsqCaught, fileSystem @*/; /** * Enable or disable a signal handler. * @param signum signal to enable (or disable if negative) - * @param handler signal handler (or NULL to use rpmsqHandler()) + * @param handler sa_sigaction handler (or NULL to use rpmsqHandler()) * @return no. of refs, -1 on error */ -int rpmsqEnable(int signum, /*@null@*/ sighandler_t handler) +int rpmsqEnable(int signum, /*@null@*/ rpmsqAction_t handler) /*@globals rpmsqCaught, fileSystem, internalState @*/ /*@modifies rpmsqCaught, fileSystem, internalState @*/; @@ -91,6 +95,16 @@ pid_t rpmsqWait(rpmsq sq) /*@modifies sq, fileSystem, internalState @*/; /** + * Call a function in a thread synchronously. + * @param start function + * @param arg function argument + * @return 0 on success + */ +int rpmsqThread(void * (*start) (void * arg), void * arg) + /*@globals fileSystem, internalState @*/ + /*@modifies fileSystem, internalState @*/; + +/** * Execute a command, returning its status. */ int rpmsqExecve (const char ** argv) |