summaryrefslogtreecommitdiffstats
path: root/src/util/util.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-09 23:30:58 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-04-20 10:55:14 -0400
commit9959c512ac3ba36f7a0db7614f0357ce0bae748f (patch)
tree43d9baf2288bb7ea9eee6af7910b7f60c17fc54f /src/util/util.h
parente3c99ae355408933b03357220f3db09423bd40dd (diff)
downloadsssd_unused-9959c512ac3ba36f7a0db7614f0357ce0bae748f.tar.gz
sssd_unused-9959c512ac3ba36f7a0db7614f0357ce0bae748f.tar.xz
sssd_unused-9959c512ac3ba36f7a0db7614f0357ce0bae748f.zip
Move atomic io function to a separate module
We'll be using it on various places of the SSSD. The function is in its own file to allow using just the one piece without having to drag in the whole util.c module.
Diffstat (limited to 'src/util/util.h')
-rw-r--r--src/util/util.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/util/util.h b/src/util/util.h
index da6db1cf..181e7516 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -42,6 +42,8 @@
#include <ldb.h>
#include <dhash.h>
+#include "util/atomic_io.h"
+
#ifndef HAVE_ERRNO_T
#define HAVE_ERRNO_T
typedef int errno_t;
@@ -510,11 +512,6 @@ errno_t sss_filter_sanitize(TALLOC_CTX *mem_ctx,
char *
sss_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr);
-ssize_t sss_atomic_io(int fd, void *buf, size_t n, bool do_read);
-
-#define sss_atomic_read(fd, buf, n) sss_atomic_io(fd, buf, n, true)
-#define sss_atomic_write(fd, buf, n) sss_atomic_io(fd, buf, n, false)
-
/* from sss_tc_utf8.c */
char *
sss_tc_utf8_str_tolower(TALLOC_CTX *mem_ctx, const char *s);