summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/atomicio.h
diff options
context:
space:
mode:
authortobias <>2007-09-07 14:50:44 +0000
committertobias <>2007-09-07 14:50:44 +0000
commite2606853a9c2dc9a603cb97d0e8f2d33d384116d (patch)
treea182c066feaf6b5058775572acc4b7ee6f1e8bfd /src/usr.bin/nc/atomicio.h
parentc3de96f3bd88d1d2bcc870d6998753b93832adc0 (diff)
downloadopenbsd-e2606853a9c2dc9a603cb97d0e8f2d33d384116d.tar.gz
openbsd-e2606853a9c2dc9a603cb97d0e8f2d33d384116d.tar.bz2
openbsd-e2606853a9c2dc9a603cb97d0e8f2d33d384116d.zip
Synced atomicio implementation in nc and sendbug with ssh.
OK djm@, joris@, ray@
Diffstat (limited to 'src/usr.bin/nc/atomicio.h')
-rw-r--r--src/usr.bin/nc/atomicio.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr.bin/nc/atomicio.h b/src/usr.bin/nc/atomicio.h
index 551a0565da..7bf5b25418 100644
--- a/src/usr.bin/nc/atomicio.h
+++ b/src/usr.bin/nc/atomicio.h
@@ -1,6 +1,7 @@
1/* $OpenBSD: atomicio.h,v 1.1 2005/05/24 20:13:28 avsm Exp $ */ 1/* $OpenBSD: atomicio.h,v 1.2 2007/09/07 14:50:44 tobias 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,14 @@
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#endif /* _ATOMICIO_H */