diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch new file mode 100644 index 0000000000..dd0efc0f36 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/0001-Add-eventfd_read-and-eventfd_write.patch | |||
@@ -0,0 +1,120 @@ | |||
1 | From e3aae24ede969e2dede1aa19c2ee520cab71ce11 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 20 Feb 2014 00:30:18 -0800 | ||
4 | Subject: [PATCH 1/3] Add eventfd_read() and eventfd_write() | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Pending | ||
8 | --- | ||
9 | libc/sysdeps/linux/common/Makefile.in | 2 ++ | ||
10 | libc/sysdeps/linux/common/eventfd_read.c | 27 +++++++++++++++++++++++++++ | ||
11 | libc/sysdeps/linux/common/eventfd_write.c | 28 ++++++++++++++++++++++++++++ | ||
12 | libc/sysdeps/linux/common/sys/eventfd.h | 4 ---- | ||
13 | 4 files changed, 57 insertions(+), 4 deletions(-) | ||
14 | create mode 100644 libc/sysdeps/linux/common/eventfd_read.c | ||
15 | create mode 100644 libc/sysdeps/linux/common/eventfd_write.c | ||
16 | |||
17 | diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in | ||
18 | index dbf0b0f..45d2e21 100644 | ||
19 | --- a/libc/sysdeps/linux/common/Makefile.in | ||
20 | +++ b/libc/sysdeps/linux/common/Makefile.in | ||
21 | @@ -25,6 +25,8 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \ | ||
22 | capset.c \ | ||
23 | dup3.c \ | ||
24 | eventfd.c \ | ||
25 | + eventfd_read.c \ | ||
26 | + eventfd_write.c \ | ||
27 | inotify.c \ | ||
28 | ioperm.c \ | ||
29 | iopl.c \ | ||
30 | diff --git a/libc/sysdeps/linux/common/eventfd_read.c b/libc/sysdeps/linux/common/eventfd_read.c | ||
31 | new file mode 100644 | ||
32 | index 0000000..75f2aaa | ||
33 | --- /dev/null | ||
34 | +++ b/libc/sysdeps/linux/common/eventfd_read.c | ||
35 | @@ -0,0 +1,27 @@ | ||
36 | +/* Copyright (C) 2007-2014 Free Software Foundation, Inc. | ||
37 | + This file is part of the GNU C Library. | ||
38 | + | ||
39 | + The GNU C Library is free software; you can redistribute it and/or | ||
40 | + modify it under the terms of the GNU Lesser General Public | ||
41 | + License as published by the Free Software Foundation; either | ||
42 | + version 2.1 of the License, or (at your option) any later version. | ||
43 | + | ||
44 | + The GNU C Library is distributed in the hope that it will be useful, | ||
45 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
46 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
47 | + Lesser General Public License for more details. | ||
48 | + | ||
49 | + You should have received a copy of the GNU Lesser General Public | ||
50 | + License along with the GNU C Library; if not, see | ||
51 | + <http://www.gnu.org/licenses/>. */ | ||
52 | + | ||
53 | +#include <errno.h> | ||
54 | +#include <unistd.h> | ||
55 | +#include <sys/eventfd.h> | ||
56 | + | ||
57 | + | ||
58 | +int | ||
59 | +eventfd_read (int fd, eventfd_t *value) | ||
60 | +{ | ||
61 | + return read (fd, value, sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0; | ||
62 | +} | ||
63 | diff --git a/libc/sysdeps/linux/common/eventfd_write.c b/libc/sysdeps/linux/common/eventfd_write.c | ||
64 | new file mode 100644 | ||
65 | index 0000000..e1509cf | ||
66 | --- /dev/null | ||
67 | +++ b/libc/sysdeps/linux/common/eventfd_write.c | ||
68 | @@ -0,0 +1,28 @@ | ||
69 | +/* Copyright (C) 2007-2014 Free Software Foundation, Inc. | ||
70 | + This file is part of the GNU C Library. | ||
71 | + | ||
72 | + The GNU C Library is free software; you can redistribute it and/or | ||
73 | + modify it under the terms of the GNU Lesser General Public | ||
74 | + License as published by the Free Software Foundation; either | ||
75 | + version 2.1 of the License, or (at your option) any later version. | ||
76 | + | ||
77 | + The GNU C Library is distributed in the hope that it will be useful, | ||
78 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
79 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
80 | + Lesser General Public License for more details. | ||
81 | + | ||
82 | + You should have received a copy of the GNU Lesser General Public | ||
83 | + License along with the GNU C Library; if not, see | ||
84 | + <http://www.gnu.org/licenses/>. */ | ||
85 | + | ||
86 | +#include <errno.h> | ||
87 | +#include <unistd.h> | ||
88 | +#include <sys/eventfd.h> | ||
89 | + | ||
90 | + | ||
91 | +int | ||
92 | +eventfd_write (int fd, eventfd_t value) | ||
93 | +{ | ||
94 | + return write (fd, &value, | ||
95 | + sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0; | ||
96 | +} | ||
97 | diff --git a/libc/sysdeps/linux/common/sys/eventfd.h b/libc/sysdeps/linux/common/sys/eventfd.h | ||
98 | index 1bf785f..91b265b 100644 | ||
99 | --- a/libc/sysdeps/linux/common/sys/eventfd.h | ||
100 | +++ b/libc/sysdeps/linux/common/sys/eventfd.h | ||
101 | @@ -33,16 +33,12 @@ __BEGIN_DECLS | ||
102 | value to COUNT. */ | ||
103 | extern int eventfd (int __count, int __flags) __THROW; | ||
104 | |||
105 | -#if 0 /* not (yet) implemented in uClibc */ | ||
106 | - | ||
107 | /* Read event counter and possibly wait for events. */ | ||
108 | extern int eventfd_read (int __fd, eventfd_t *__value); | ||
109 | |||
110 | /* Increment event counter. */ | ||
111 | extern int eventfd_write (int __fd, eventfd_t __value); | ||
112 | |||
113 | -#endif | ||
114 | - | ||
115 | __END_DECLS | ||
116 | |||
117 | #endif /* sys/eventfd.h */ | ||
118 | -- | ||
119 | 1.9.0 | ||
120 | |||