Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

848 Function Prototypes Appendix A


int clock_gettime(clockid_tclock_id,struct timespec *tsp);
<sys/time.h> p. 189
clock_id:CLOCK_REALTIME, CLOCK_MONOTONIC,
CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID
Returns: 0 if OK,−1 on error

int clock_nanosleep(clockid_tclock_id,intflags,
const struct timespec *reqtp,
struct timespec *remtp);
<time.h> p. 375
clock_id:CLOCK_REALTIME, CLOCK_MONOTONIC,
CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID
flags:TIMER_ABSTIME
Returns: 0 if slept for requested time, error number on failure

int clock_settime(clockid_tclock_id,const struct timespec *tsp);
<sys/time.h> p. 190
clock_id:CLOCK_REALTIME, CLOCK_MONOTONIC,
CLOCK_PROCESS_CPUTIME_ID,
CLOCK_THREAD_CPUTIME_ID
Returns: 0 if OK,−1 on error

int close(intfd);
<unistd.h> p. 66
Returns: 0 if OK,−1 on error

int closedir(DIR *dp);
<dirent.h> p. 130
Returns: 0 if OK,−1 on error

void closelog(void);
<syslog.h> p. 470

unsigned
char *CMSG_DATA(struct cmsghdr *cp);
<sys/socket.h> p. 645
Returns: pointer to data associated withcmsghdrstructure

struct
cmsghdr *CMSG_FIRSTHDR(struct msghdr *mp);
<sys/socket.h> p. 645
Returns: pointer to firstcmsghdrstructureassociated with
themsghdrstructure, orNULLif none exists
Free download pdf