rpmsq.h
Go to the documentation of this file.
#ifndef H_RPMSQ
#define H_RPMSQ
#include <rpmsw.h>
typedef struct rpmsig_s * rpmsig;
typedef struct rpmsqElem * rpmsq;
typedef void (*rpmsqAction_t) (int signum, void * info, void * context)
/*@*/;
/*@-redecl@*/
/*@unchecked@*/
extern int _rpmsq_debug;
/*@=redecl@*/
#if defined(_RPMSQ_INTERNAL)
struct rpmsqElem {
struct rpmsqElem * q_forw;
struct rpmsqElem * q_back;
pid_t child;
volatile pid_t reaped;
volatile int status;
struct rpmop_s op;
rpmtime_t ms_scriptlets;
int reaper;
int pipes[2];
/*@shared@*/
void * id;
};
#endif
/*@-exportlocal@*/
/*@unchecked@*/
extern rpmsq rpmsqQueue;
/*@=exportlocal@*/
/*@unchecked@*/
extern sigset_t rpmsqCaught;
#ifdef __cplusplus
extern "C" {
#endif
/*@-exportlocal@*/
int rpmsqInsert(/*@null@*/ void * elem, /*@null@*/ void * prev)
/*@globals rpmsqQueue, systemState @*/
/*@modifies elem, prev, rpmsqQueue, systemState @*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
int rpmsqRemove(/*@null@*/ void * elem)
/*@globals fileSystem, internalState @*/
/*@modifies elem, fileSystem, internalState @*/;
/*@=exportlocal@*/
/*@-exportlocal@*/
void rpmsqAction(int signum, void * info, void * context)
/*@globals rpmsqCaught, rpmsqQueue, errno, fileSystem, internalState @*/
/*@modifies rpmsqCaught, rpmsqQueue, errno,
fileSystem, internalState @*/;
/*@=exportlocal@*/
int rpmsqEnable(int signum, /*@null@*/ rpmsqAction_t handler)
/*@globals rpmsqCaught, rpmsqQueue, fileSystem, internalState @*/
/*@modifies rpmsqCaught, rpmsqQueue, fileSystem, internalState @*/;
pid_t rpmsqFork(rpmsq sq)
/*@globals fileSystem, internalState @*/
/*@modifies sq, fileSystem, internalState @*/;
pid_t rpmsqWait(rpmsq sq)
/*@globals fileSystem, internalState @*/
/*@modifies sq, fileSystem, internalState @*/;
void * rpmsqThread(void * (*start) (void * arg), void * arg)
/*@globals internalState @*/
/*@modifies internalState @*/;
int rpmsqJoin(/*@null@*/ void * thread)
/*@globals internalState @*/
/*@modifies internalState @*/;
int rpmsqThreadEqual(/*@null@*/ void * thread)
/*@globals internalState @*/
/*@modifies internalState @*/;
int rpmsqExecve (const char ** argv)
/*@globals fileSystem, internalState @*/
/*@modifies fileSystem, internalState @*/;
#ifdef __cplusplus
}
#endif
#endif /* H_RPMSQ */