summaryrefslogtreecommitdiff
path: root/atomicio.h
diff options
context:
space:
mode:
Diffstat (limited to 'atomicio.h')
-rw-r--r--atomicio.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/atomicio.h b/atomicio.h
index 7eccf206b..2fcd25d43 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -1,6 +1,7 @@
1/* $OpenBSD: atomicio.h,v 1.6 2005/05/24 17:32:43 avsm Exp $ */ 1/* $OpenBSD: atomicio.h,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Damien Miller. All rights reserved.
4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 5 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
5 * All rights reserved. 6 * All rights reserved.
6 * 7 *
@@ -25,9 +26,20 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 27 */
27 28
29#ifndef _ATOMICIO_H
30#define _ATOMICIO_H
31
28/* 32/*
29 * Ensure all of data on socket comes through. f==read || f==vwrite 33 * Ensure all of data on socket comes through. f==read || f==vwrite
30 */ 34 */
31size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t); 35size_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
32 36
33#define vwrite (ssize_t (*)(int, void *, size_t))write 37#define vwrite (ssize_t (*)(int, void *, size_t))write
38
39/*
40 * ensure all of data on socket comes through. f==readv || f==writev
41 */
42size_t atomiciov(ssize_t (*)(int, const struct iovec *, int),
43 int, const struct iovec *, int);
44
45#endif /* _ATOMICIO_H */