We still lack a gettid implemenation from libc. Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> --- src/include/rt-utils.h | 2 ++ src/lib/rt-utils.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/include/rt-utils.h b/src/include/rt-utils.h index 37f46c8..ef0f6ac 100644 --- a/src/include/rt-utils.h +++ b/src/include/rt-utils.h @@ -22,4 +22,6 @@ int event_disable_all(void); const char *policy_to_string(int policy); uint32_t string_to_policy(const char *str); +pid_t gettid(void); + #endif /* __RT_UTILS.H */ diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c index df522fe..3882d23 100644 --- a/src/lib/rt-utils.c +++ b/src/lib/rt-utils.c @@ -16,6 +16,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> +#include <sys/syscall.h> /* For SYS_gettid definitions */ #include "rt-utils.h" #include "rt-sched.h" #include "error.h" @@ -311,3 +312,8 @@ uint32_t string_to_policy(const char *str) return 0; } + +pid_t gettid(void) +{ + return syscall(SYS_gettid); +} -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html