[uclibc-ng-devel] uClibc-ng - small C library for embedded systems branch master updated. 628943bcfde03547b9f83d04578bd1e8aa5d23fc

wbx wbx at helium.waldemar-brodkorb.de
Fri Sep 26 18:41:35 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".

The branch, master has been updated
       via  628943bcfde03547b9f83d04578bd1e8aa5d23fc (commit)
      from  bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 628943bcfde03547b9f83d04578bd1e8aa5d23fc
Author: Waldemar Brodkorb <wbx at uclibc-ng.org>
Date:   Sat Jul 5 18:09:19 2014 +0200

    Add eventfd_read() and eventfd_write()
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 libc/sysdeps/linux/common/Makefile.in                       |    2 ++
 .../sysdeps/linux/common/eventfd_read.c                     |   10 +++++-----
 .../sysdeps/linux/common/eventfd_write.c                    |   11 ++++++-----
 libc/sysdeps/linux/common/sys/eventfd.h                     |    4 ----
 4 files changed, 13 insertions(+), 14 deletions(-)
 copy libpthread/linuxthreads/pthread_seteuid.c => libc/sysdeps/linux/common/eventfd_read.c (77%)
 copy libpthread/linuxthreads/pthread_seteuid.c => libc/sysdeps/linux/common/eventfd_write.c (77%)

diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index a175ab6..9d41771 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -25,6 +25,8 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
 	capset.c \
 	dup3.c \
 	eventfd.c \
+	eventfd_read.c \
+	eventfd_write.c \
 	inotify.c \
 	ioperm.c \
 	iopl.c \
diff --git a/libpthread/linuxthreads/pthread_seteuid.c b/libc/sysdeps/linux/common/eventfd_read.c
similarity index 77%
copy from libpthread/linuxthreads/pthread_seteuid.c
copy to libc/sysdeps/linux/common/eventfd_read.c
index a5423a9..75f2aaa 100644
--- a/libpthread/linuxthreads/pthread_seteuid.c
+++ b/libc/sysdeps/linux/common/eventfd_read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,13 +15,13 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <pthread.h>
+#include <errno.h>
 #include <unistd.h>
+#include <sys/eventfd.h>
 
 
-int pthread_seteuid_np (uid_t uid);
 int
-pthread_seteuid_np (uid_t uid)
+eventfd_read (int fd, eventfd_t *value)
 {
-  return seteuid (uid);
+  return read (fd, value, sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0;
 }
diff --git a/libpthread/linuxthreads/pthread_seteuid.c b/libc/sysdeps/linux/common/eventfd_write.c
similarity index 77%
copy from libpthread/linuxthreads/pthread_seteuid.c
copy to libc/sysdeps/linux/common/eventfd_write.c
index a5423a9..e1509cf 100644
--- a/libpthread/linuxthreads/pthread_seteuid.c
+++ b/libc/sysdeps/linux/common/eventfd_write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2007-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,13 +15,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <pthread.h>
+#include <errno.h>
 #include <unistd.h>
+#include <sys/eventfd.h>
 
 
-int pthread_seteuid_np (uid_t uid);
 int
-pthread_seteuid_np (uid_t uid)
+eventfd_write (int fd, eventfd_t value)
 {
-  return seteuid (uid);
+  return write (fd, &value,
+		sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0;
 }
diff --git a/libc/sysdeps/linux/common/sys/eventfd.h b/libc/sysdeps/linux/common/sys/eventfd.h
index 1bf785f..91b265b 100644
--- a/libc/sysdeps/linux/common/sys/eventfd.h
+++ b/libc/sysdeps/linux/common/sys/eventfd.h
@@ -33,16 +33,12 @@ __BEGIN_DECLS
    value to COUNT.  */
 extern int eventfd (int __count, int __flags) __THROW;
 
-#if 0 /* not (yet) implemented in uClibc */
-
 /* Read event counter and possibly wait for events.  */
 extern int eventfd_read (int __fd, eventfd_t *__value);
 
 /* Increment event counter.  */
 extern int eventfd_write (int __fd, eventfd_t __value);
 
-#endif
-
 __END_DECLS
 
 #endif /* sys/eventfd.h */


hooks/post-receive
-- 
uClibc-ng - small C library for embedded systems


More information about the devel mailing list