summaryrefslogtreecommitdiff
path: root/atomicio.h
diff options
context:
space:
mode:
Diffstat (limited to 'atomicio.h')
-rw-r--r--atomicio.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/atomicio.h b/atomicio.h
index ddb63ee8..03bf065e 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -1,6 +1,7 @@
-/* $OpenBSD: atomicio.h,v 1.7 2006/03/25 22:22:42 djm Exp $ */
+/* $OpenBSD: atomicio.h,v 1.8 2006/04/16 00:52:55 djm Exp $ */
/*
+ * Copyright (c) 2006 Damien Miller. All rights reserved.
* Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
* All rights reserved.
*
@@ -25,9 +26,24 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _ATOMICIO_H
+#define _ATOMICIO_H
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/uio.h>
+
/*
* Ensure all of data on socket comes through. f==read || f==vwrite
*/
size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
#define vwrite (ssize_t (*)(int, void *, size_t))write
+
+/*
+ * ensure all of data on socket comes through. f==readv || f==writev
+ */
+size_t atomiciov(ssize_t (*)(int, const struct iovec *, int),
+ int, const struct iovec *, int);
+
+#endif /* _ATOMICIO_H */