[libc] modify function names to resolve naming conflicts
This commit is contained in:
parent
2552759e96
commit
7c27319521
|
@ -801,7 +801,7 @@ RTM_EXPORT(rt_timespec_to_tick);
|
||||||
struct timer_obj
|
struct timer_obj
|
||||||
{
|
{
|
||||||
struct rt_ktime_hrtimer hrtimer;
|
struct rt_ktime_hrtimer hrtimer;
|
||||||
void (*sigev_notify_function)(union sigval val);
|
void (*sigev_notify_func)(union sigval val);
|
||||||
union sigval val;
|
union sigval val;
|
||||||
struct timespec interval; /* Reload value */
|
struct timespec interval; /* Reload value */
|
||||||
struct timespec value; /* Reload value */
|
struct timespec value; /* Reload value */
|
||||||
|
@ -903,7 +903,7 @@ static void rtthread_timer_wrapper(void *timerobj)
|
||||||
}
|
}
|
||||||
#ifdef RT_USING_SMART
|
#ifdef RT_USING_SMART
|
||||||
/* this field is named as tid in musl */
|
/* this field is named as tid in musl */
|
||||||
void *ptid = &timer->sigev_notify_function;
|
void *ptid = &timer->sigev_notify_func;
|
||||||
int tid = *(int *)ptid;
|
int tid = *(int *)ptid;
|
||||||
struct lwp_timer_event_param *data = rt_container_of(timer->work, struct lwp_timer_event_param, work);
|
struct lwp_timer_event_param *data = rt_container_of(timer->work, struct lwp_timer_event_param, work);
|
||||||
data->signo = timer->sigev_signo;
|
data->signo = timer->sigev_signo;
|
||||||
|
@ -922,9 +922,9 @@ static void rtthread_timer_wrapper(void *timerobj)
|
||||||
if (rt_work_submit(timer->work, 0))
|
if (rt_work_submit(timer->work, 0))
|
||||||
RT_ASSERT(0);
|
RT_ASSERT(0);
|
||||||
#else
|
#else
|
||||||
if(timer->sigev_notify_function != RT_NULL)
|
if(timer->sigev_notify_func != RT_NULL)
|
||||||
{
|
{
|
||||||
(timer->sigev_notify_function)(timer->val);
|
(timer->sigev_notify_func)(timer->val);
|
||||||
}
|
}
|
||||||
#endif /* RT_USING_SMART */
|
#endif /* RT_USING_SMART */
|
||||||
}
|
}
|
||||||
|
@ -1012,7 +1012,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
|
||||||
|
|
||||||
timer->work = work;
|
timer->work = work;
|
||||||
#endif /* RT_USING_SMART */
|
#endif /* RT_USING_SMART */
|
||||||
timer->sigev_notify_function = evp->sigev_notify_function;
|
timer->sigev_notify_func = evp->sigev_notify_function;
|
||||||
timer->val = evp->sigev_value;
|
timer->val = evp->sigev_value;
|
||||||
timer->interval.tv_sec = 0;
|
timer->interval.tv_sec = 0;
|
||||||
timer->interval.tv_nsec = 0;
|
timer->interval.tv_nsec = 0;
|
||||||
|
|
|
@ -22,18 +22,33 @@
|
||||||
#define O_DSYNC 010000
|
#define O_DSYNC 010000
|
||||||
#define O_SYNC 04010000
|
#define O_SYNC 04010000
|
||||||
#define O_RSYNC 04010000
|
#define O_RSYNC 04010000
|
||||||
#define O_DIRECTORY 040000
|
|
||||||
#define O_NOFOLLOW 0100000
|
|
||||||
#define O_CLOEXEC 02000000
|
#define O_CLOEXEC 02000000
|
||||||
|
|
||||||
#define O_ASYNC 020000
|
#define O_ASYNC 020000
|
||||||
#define O_DIRECT 0200000
|
|
||||||
#define O_LARGEFILE 0400000
|
|
||||||
#define O_NOATIME 01000000
|
#define O_NOATIME 01000000
|
||||||
#define O_PATH 010000000
|
#define O_PATH 010000000
|
||||||
#define O_TMPFILE 020040000
|
|
||||||
#define O_NDELAY O_NONBLOCK
|
#define O_NDELAY O_NONBLOCK
|
||||||
|
|
||||||
|
#ifndef O_LARGEFILE
|
||||||
|
#define O_LARGEFILE 0400000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_DIRECT
|
||||||
|
#define O_DIRECT 0200000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_TMPFILE
|
||||||
|
#define O_TMPFILE 020040000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_NOFOLLOW
|
||||||
|
#define O_NOFOLLOW 0100000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef O_DIRECTORY
|
||||||
|
#define O_DIRECTORY 040000
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef O_BINARY
|
#ifndef O_BINARY
|
||||||
#define O_BINARY 00
|
#define O_BINARY 00
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef long suseconds_t; /* microseconds (signed) */
|
|
||||||
typedef uint32_t id_t; /* may contain pid, uid or gid */
|
typedef uint32_t id_t; /* may contain pid, uid or gid */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue