📄 unpipc.h
字号:
int set_concurrency(int);
Sigfunc *signal_intr(int, Sigfunc *);
int sleep_us(unsigned int);
int start_time(void);
double stop_time(void);
int touch(void *, int);
void tv_sub(struct timeval *, struct timeval *);
int writable_timeo(int, int);
ssize_t writen(int, const void *, size_t);
#ifndef HAVE_GETHOSTNAME_PROTO
int gethostname(char *, int);
#endif
#ifndef HAVE_ISFDTYPE_PROTO
int isfdtype(int, int);
#endif
#ifndef HAVE_PSELECT_PROTO
int pselect(int, fd_set *, fd_set *, fd_set *,
const struct timespec *, const sigset_t *);
#endif
#ifndef HAVE_SNPRINTF_PROTO
int snprintf(char *, size_t, const char *, ...);
#endif
/* prototypes for our own library wrapper functions */
char *Gf_time(void);
void Lock_reg(int, int, int, off_t, int, off_t);
pid_t Lock_test(int, int, off_t, int, off_t);
void *My_shm(size_t);
char *Px_ipc_name(const char *);
int Readable_timeo(int, int);
ssize_t Readline(int, void *, size_t);
ssize_t Readn(int, void *, size_t);
void Set_concurrency(int);
Sigfunc *Signal(int, Sigfunc *);
Sigfunc *Signal_intr(int, Sigfunc *);
#ifdef HAVE_SIGINFO_T_STRUCT
Sigfunc_rt *Signal_rt(int, Sigfunc_rt *);
Sigfunc_rt *Signal_rt_intr(int, Sigfunc_rt *);
#endif
void Sleep_us(unsigned int);
void Start_time(void);
double Stop_time(void);
void Touch(void *, int);
int Writable_timeo(int, int);
void Writen(int, void *, size_t);
/* prototypes for our Unix wrapper functions */
void *Calloc(size_t, size_t);
void Close(int);
void Dup2(int, int);
int Fcntl(int, int, void *);
pid_t Fork(void);
long Fpathconf(int, int);
void Fstat(int, struct stat *);
key_t Ftok(const char *, int);
void Ftruncate(int, off_t);
int Getopt(int, char *const *, const char *);
void Gettimeofday(struct timeval *, void *);
int Ioctl(int, int, void *);
void Kill(pid_t, int);
off_t Lseek(int, off_t, int);
void *Malloc(size_t);
void Mkfifo(const char *, mode_t);
void Mktemp(char *);
void *Mmap(void *, size_t, int, int, int, off_t);
void Munmap(void *, size_t);
int Open(const char *, int, ...);
long Pathconf(const char *, int);
void Pipe(int *fds);
ssize_t Read(int, void *, size_t);
int Select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
void Sigaddset(sigset_t *, int);
void Sigdelset(sigset_t *, int);
void Sigemptyset(sigset_t *);
void Sigfillset(sigset_t *);
int Sigismember(const sigset_t *, int);
void Sigpending(sigset_t *);
void Sigprocmask(int, const sigset_t *, sigset_t *);
#ifdef HAVE_SIGINFO_T_STRUCT
void Sigqueue(pid_t, int, const union sigval);
#endif
#ifdef HAVE_SIGWAIT
void Sigwait(const sigset_t *, int *);
#endif
void Stat(const char *, struct stat *);
char *Strdup(const char *);
long Sysconf(int);
void Sysctl(int *, u_int, void *, size_t *, void *, size_t);
void Unlink(const char *);
void *Valloc(size_t);
pid_t Wait(int *);
pid_t Waitpid(pid_t, int *, int);
void Write(int, void *, size_t);
#ifdef HAVE_MQUEUE_H
/* 4Posix message queues */
mqd_t Mq_open(const char *, int, ...);
void Mq_close(mqd_t);
void Mq_unlink(const char *pathname);
void Mq_send(mqd_t, const char *, size_t, unsigned int);
ssize_t Mq_receive(mqd_t, char *, size_t, unsigned int *);
void Mq_notify(mqd_t, const struct sigevent *);
void Mq_getattr(mqd_t, struct mq_attr *);
void Mq_setattr(mqd_t, const struct mq_attr *, struct mq_attr *);
#endif /* HAVE_MQUEUE_H */
#ifdef HAVE_SEMAPHORE_H
/* 4Posix semaphores */
sem_t *Sem_open(const char *, int, ...);
void Sem_close(sem_t *);
void Sem_unlink(const char *);
void Sem_init(sem_t *, int, unsigned int);
void Sem_destroy(sem_t *);
void Sem_wait(sem_t *);
int Sem_trywait(sem_t *);
void Sem_post(sem_t *);
void Sem_getvalue(sem_t *, int *);
#endif /* HAVE_SEMAPHORE_H */
/* Note that <sys/mman.h> is defined on some systems that do not support
* Posix shared memory (e.g., 4.4BSD), because this header predates Posix
* and appears on any system that supports mmap(). Therefore we cannot
* use this to determine whether the implementation supports Posix shared
* memory or not. We use our own HAVE_SHM_OPEN_PROTO symbol.
*/
#ifdef HAVE_SHM_OPEN_PROTO
/* 4Posix shared memory */
int Shm_open(const char *, int, mode_t);
void Shm_unlink(const char *);
#endif
#ifdef HAVE_SYS_MSG_H
/* 4System V message queues */
int Msgget(key_t key, int flag);
void Msgctl(int, int, struct msqid_ds *);
void Msgsnd(int, const void *, size_t, int);
ssize_t Msgrcv(int, void *, size_t, int, int);
#endif /* HAVE_SYS_MSG_H */
#ifdef HAVE_SYS_SEM_H
/* 4System V semaphores */
int Semget(key_t, int, int);
int Semctl(int, int, int, ...);
void Semop(int, struct sembuf *, size_t);
#endif /* HAVE_SYS_SEM_H */
#ifdef HAVE_SYS_SHM_H
/* 4System V shared memory */
int Shmget(key_t, size_t, int);
void *Shmat(int, const void *, int);
void Shmdt(const void *);
void Shmctl(int, int, struct shmid_ds *);
#endif /* HAVE_SYS_SHM_H */
/* prototypes for our stdio wrapper functions */
void Fclose(FILE *);
FILE *Fdopen(int, const char *);
char *Fgets(char *, int, FILE *);
FILE *Fopen(const char *, const char *);
void Fputs(const char *, FILE *);
FILE *Popen(const char *, const char *);
int Pclose(FILE *);
#ifdef HAVE_FATTACH
void Fattach(int, const char *);
#endif
#ifdef HAVE_POLL
int Poll(struct pollfd *, unsigned long, int);
#endif
void err_dump(const char *, ...);
void err_msg(const char *, ...);
void err_quit(const char *, ...);
void err_ret(const char *, ...);
void err_sys(const char *, ...);
/* prototypes for our pthread wrapper functions */
void Pthread_attr_init(pthread_attr_t *);
void Pthread_attr_destroy(pthread_attr_t *);
void Pthread_attr_setdetachstate(pthread_attr_t *, int);
void Pthread_attr_setscope(pthread_attr_t *, int);
void Pthread_create(pthread_t *, const pthread_attr_t *,
void * (*)(void *), void *);
void Pthread_join(pthread_t, void **);
void Pthread_detach(pthread_t);
void Pthread_kill(pthread_t, int);
void Pthread_setcancelstate(int, int *);
void Pthread_mutexattr_init(pthread_mutexattr_t *);
void Pthread_mutexattr_destroy(pthread_mutexattr_t *);
void Pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
void Pthread_mutex_init(pthread_mutex_t *, pthread_mutexattr_t *);
void Pthread_mutex_destroy(pthread_mutex_t *);
void Pthread_mutex_lock(pthread_mutex_t *);
void Pthread_mutex_unlock(pthread_mutex_t *);
void Pthread_condattr_init(pthread_condattr_t *);
void Pthread_condattr_destroy(pthread_condattr_t *);
void Pthread_condattr_setpshared(pthread_condattr_t *, int);
void Pthread_cond_broadcast(pthread_cond_t *);
void Pthread_cond_signal(pthread_cond_t *);
void Pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
void Pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *,
const struct timespec *);
void Pthread_key_create(pthread_key_t *, void (*)(void *));
void Pthread_setspecific(pthread_key_t, const void *);
void Pthread_once(pthread_once_t *, void (*)(void));
long pr_thread_id(pthread_t *);
#ifdef HAVE_DOOR_H
/* typedefs to simplify declarations */
typedef void Door_server_proc(void *, char *, size_t, door_desc_t *, size_t);
typedef void Door_create_proc(door_info_t *);
/* prototypes for our doors wrapper functions */
void Door_bind(int);
void Door_call(int, door_arg_t *);
int Door_create(Door_server_proc *, void *, u_int);
void Door_cred(door_cred_t *);
void Door_info(int, door_info_t *);
void Door_return(char *, size_t, door_desc_t *, size_t);
void Door_revoke(int);
void Door_unbind(void);
Door_create_proc *Door_server_create(Door_create_proc *);
#endif /* HAVE_DOOR_H */
#ifdef HAVE_RPC_RPC_H
CLIENT *Clnt_create(const char *, u_long, u_long, const char *);
void Clnt_control(CLIENT *, u_int, char *);
#endif
#endif /* __unpipc_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -