#ifndef MPLIB1_BPO_PROC #define MPLIB1_BPO_PROC /* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source$ * $Author$ * $Date$ * $Revision$ * ******************************************************************************* * * Change History * * $Log$ * ******************************************************************************* */ #ident "$Header$" #ifndef MPLIB1_CONFIG #include #endif #ifndef MPLIB1_BPO_LOCK #include #endif #ifndef MPLIB1_BPO_LIST #include #endif /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ #ifndef BIT #define BIT(n) (1<<(n)) #endif #define SHM_INHERIT_GROUP BIT(0) #define SHM_INHERIT_PROGRAM BIT(1) #define SHM_AUTOMAGIC_PIPE BIT(2) #define SHM_CHECK_ALL_PROCESSES 1 #define SHM_CHECK_THIS_PROCESS 2 #define SHM_CHECK_DEAD_PROCESSES 3 /* Return values to the validate processes inform call */ #define SHM_LEAVE_PROC 0 #define SHM_DELETE_PROC 1 #ifndef PID_STR_LEN #define PID_STR_LEN 12 #endif #ifndef SODB_READ_CONFIG #define SODB_READ_CONFIG BIT(0) #endif /* ------------------------------------------------------------------ structures ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ function definitions ------------------------------------------------------------------ */ /* functions that deal exclusively with ourself */ extern int Set_My_Proc_Details( const char *group_name, const char *prog_name, const char *fifo_prefix, const char *fifo_name, mode_t fifo_mode, int flags ); #ifndef MPLIB1_BPO_PROC_INTERNAL extern void * Get_My_Proc_Details( mode_t privs ); extern void * Check_My_Proc_Details( void ); #endif extern ssize_t Wait_Process_Pipe( void ); extern int Get_Process_Pipe_fd( void ); /* Now related to a given segment */ extern int Remove_Shm_Process( const void *hint, const char *pid_str ); extern int Register_Process_Details( const void *hint ); extern int Deregister_Process_Details( const void *hint ); extern int Add_This_Pid_Resource( const void *hint, bpo_Node_t *nptr ); extern ssize_t Inform_Named_Pipe( const char *pipe_name ); extern ssize_t Inform_Process_Str( const void *hint, const char *pid_str ); extern ssize_t Inform_Process_Pid( const void *hint, pid_t pid ); extern int scan_dead_pipes( const char *dir_name ); /* And the higher level standard comms attached routine */ extern void *get_comms_hint( void ); extern void *comms_shm_attach( const char *config_name, int flags ); extern void comms_shm_detach( void ); #endif /* -- End of File -- */