-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
8,595 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From bb08cd16cb0353b3d4116ca8959dbecd2e78f545 Mon Sep 17 00:00:00 2001 | ||
From: Peter Korsgaard <[email protected]> | ||
Date: Tue, 3 Jul 2012 15:54:57 +0200 | ||
Subject: [PATCH 1/8] bits/time.h: sync with glibc 2.16 | ||
|
||
CLOCK_MONOTONIC_RAW is available since 2.6.28 | ||
(2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and | ||
CLOCK_*_COARSE since 2.6.32 (da15cfdae033: time: Introduce | ||
CLOCK_REALTIME_COARSE). | ||
|
||
Signed-off-by: Peter Korsgaard <[email protected]> | ||
Signed-off-by: Bernhard Reutner-Fischer <[email protected]> | ||
Signed-off-by: Thomas Petazzoni <[email protected]> | ||
--- | ||
libc/sysdeps/linux/common/bits/time.h | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/libc/sysdeps/linux/common/bits/time.h b/libc/sysdeps/linux/common/bits/time.h | ||
index 7ed54bf..c871223 100644 | ||
--- a/libc/sysdeps/linux/common/bits/time.h | ||
+++ b/libc/sysdeps/linux/common/bits/time.h | ||
@@ -54,6 +54,12 @@ | ||
# define CLOCK_PROCESS_CPUTIME_ID 2 | ||
/* Thread-specific CPU-time clock. */ | ||
# define CLOCK_THREAD_CPUTIME_ID 3 | ||
+/* Monotonic system-wide clock, not adjusted for frequency scaling. */ | ||
+# define CLOCK_MONOTONIC_RAW 4 | ||
+/* Identifier for system-wide realtime clock, updated only on ticks. */ | ||
+# define CLOCK_REALTIME_COARSE 5 | ||
+/* Monotonic system-wide clock, updated only on ticks. */ | ||
+# define CLOCK_MONOTONIC_COARSE 6 | ||
|
||
/* Flag to indicate time is absolute. */ | ||
# define TIMER_ABSTIME 1 | ||
-- | ||
1.8.1.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 518bc50ae42540574bba360225c8a65b56b79148 Mon Sep 17 00:00:00 2001 | ||
From: Jonas Bonn <[email protected]> | ||
Date: Tue, 6 Sep 2011 10:30:40 +0200 | ||
Subject: [PATCH 3/8] Add dup3 syscall | ||
|
||
Signed-off-by: Jonas Bonn <[email protected]> | ||
Signed-off-by: Thomas Petazzoni <[email protected]> | ||
--- | ||
include/unistd.h | 4 ++++ | ||
libc/sysdeps/linux/common/dup3.c | 17 +++++++++++++++++ | ||
2 files changed, 21 insertions(+) | ||
create mode 100644 libc/sysdeps/linux/common/dup3.c | ||
|
||
diff --git a/include/unistd.h b/include/unistd.h | ||
index 1b2fd4d..f7d070b 100644 | ||
--- a/include/unistd.h | ||
+++ b/include/unistd.h | ||
@@ -513,6 +513,10 @@ extern int dup (int __fd) __THROW __wur; | ||
extern int dup2 (int __fd, int __fd2) __THROW; | ||
libc_hidden_proto(dup2) | ||
|
||
+/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ | ||
+extern int dup3 (int __fd, int __fd2, int __flags) __THROW; | ||
+libc_hidden_proto(dup3) | ||
+ | ||
/* NULL-terminated array of "NAME=VALUE" environment variables. */ | ||
extern char **__environ; | ||
#ifdef __USE_GNU | ||
diff --git a/libc/sysdeps/linux/common/dup3.c b/libc/sysdeps/linux/common/dup3.c | ||
new file mode 100644 | ||
index 0000000..7b57438 | ||
--- /dev/null | ||
+++ b/libc/sysdeps/linux/common/dup3.c | ||
@@ -0,0 +1,17 @@ | ||
+/* vi: set sw=4 ts=4: */ | ||
+/* | ||
+ * dup3() for uClibc | ||
+ * | ||
+ * Copyright (C) 2000-2006 Erik Andersen <[email protected]> | ||
+ * | ||
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. | ||
+ */ | ||
+ | ||
+#include <sys/syscall.h> | ||
+#include <unistd.h> | ||
+ | ||
+ | ||
+#ifdef __NR_dup3 | ||
+_syscall3(int, dup3, int, oldfd, int, newfd, int, flags) | ||
+libc_hidden_def(dup3) | ||
+#endif | ||
-- | ||
1.8.1.2 | ||
|
Oops, something went wrong.