diff options
Diffstat (limited to 'usr.sbin/popa3d/misc.h')
-rw-r--r-- | usr.sbin/popa3d/misc.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/usr.sbin/popa3d/misc.h b/usr.sbin/popa3d/misc.h new file mode 100644 index 00000000000..097d3c75c3a --- /dev/null +++ b/usr.sbin/popa3d/misc.h @@ -0,0 +1,29 @@ +/* $OpenBSD: misc.h,v 1.1 2001/08/19 13:05:57 deraadt Exp $ */ + +/* + * Miscellaneous syscall wrappers. + */ + +#ifndef _POP_MISC_H +#define _POP_MISC_H + +/* + * A select(2)-based sleep() equivalent: no more problems with SIGALRM, + * subsecond precision. + */ +extern int sleep_select(int sec, int usec); + +/* + * Obtain or remove a lock. + */ +extern int lock_fd(int fd, int shared); +extern int unlock_fd(int fd); + +/* + * Attempts to write all the supplied data. Returns the number of bytes + * written. Any value that differs from the requested count means that + * an error has occured; if the value is -1, errno is set appropriately. + */ +extern int write_loop(int fd, char *buffer, int count); + +#endif |