Commit c8b3bb1c authored by Philippe Gerum's avatar Philippe Gerum
Browse files

lib/thread: rename evl_attach_self_flags() to evl_attach_thread()


Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
parent 4cb1ca45
......@@ -20,7 +20,7 @@
#include <evl/poll.h>
#include <evl/proxy.h>
#define __EVL__ 11 /* API version */
#define __EVL__ 12 /* API version */
#define EVL_ABI_PREREQ 21
......
......@@ -29,7 +29,7 @@
})
#define evl_attach_self(__fmt, __args...) \
evl_attach_self_flags(0, __fmt, ##__args)
evl_attach_thread(EVL_CLONE_PRIVATE, __fmt, ##__args)
#ifdef __cplusplus
extern "C" {
......@@ -49,9 +49,14 @@ static inline bool evl_is_inband(void)
return !!(evl_get_current_mode() & T_INBAND);
}
int evl_attach_self_flags(int flags, const char *fmt, ...);
int evl_attach_thread(int flags, const char *fmt, ...);
int evl_detach_self(void);
int evl_detach_thread(int flags);
static inline int evl_detach_self(void)
{
return evl_detach_thread(0);
}
int evl_get_self(void);
......
......@@ -50,7 +50,7 @@ static void do_atfork_once(void)
pthread_atfork(NULL, NULL, atfork_clear_tls);
}
int evl_attach_self_flags(int flags, const char *fmt, ...)
int evl_attach_thread(int flags, const char *fmt, ...)
{
int efd, ret, policy, priority;
struct evl_sched_attrs attrs;
......@@ -132,11 +132,15 @@ fail:
return ret;
}
int evl_detach_self(void)
int evl_detach_thread(int flags)
{
__u32 mode = T_WOSS;
int ret;
/* flags are unused so far and should be zero. */
if (flags)
return -EINVAL;
if (evl_current == EVL_NO_HANDLE)
return -EPERM;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment