diff --git a/src/os/nos/inc/NOS-time.h b/src/os/nos/inc/NOS-time.h index baa06eb44..b65b254a7 100644 --- a/src/os/nos/inc/NOS-time.h +++ b/src/os/nos/inc/NOS-time.h @@ -32,7 +32,7 @@ int NOS_clock_getres (clockid_t clock_id, struct timespec * res); int NOS_clock_gettime (clockid_t clock_id, struct timespec * tp); int NOS_clock_nanosleep (clockid_t clock_id, int flags, const struct timespec * req, struct timespec * rem); int NOS_clock_settime (clockid_t clock_id, const struct timespec * tp); -int NOS_timer_create (clockid_t clock_id, struct sigevent * evp, timer_t * timerid); +int NOS_timer_create (clockid_t clock_id, const struct sigevent * evp, timer_t * timerid); int NOS_timer_delete (timer_t timerid) ; // int NOS_timer_gettime (timer_t timerid, struct itimerspec * value); // unused int NOS_timer_settime (timer_t timerid, int flags, const struct itimerspec * value, struct itimerspec * ovalue); diff --git a/src/os/nos/src/NOS-time.c b/src/os/nos/src/NOS-time.c index dd118e0a9..d3edb1fc0 100644 --- a/src/os/nos/src/NOS-time.c +++ b/src/os/nos/src/NOS-time.c @@ -99,7 +99,7 @@ typedef struct NOS_timer_t { static pthread_mutex_t NOS_timer_table_mutex; static NOS_timer_t NOS_timer_table[OS_MAX_TIMEBASES]; -int NOS_timer_create (clockid_t clock_id, struct sigevent * evp, timer_t * timerid) +int NOS_timer_create (clockid_t clock_id, const struct sigevent * evp, timer_t * timerid) { int retval = 0; int i; diff --git a/src/os/nos/src/os-impl-tasks.c b/src/os/nos/src/os-impl-tasks.c index 82cf15579..b861d4842 100644 --- a/src/os/nos/src/os-impl-tasks.c +++ b/src/os/nos/src/os-impl-tasks.c @@ -554,13 +554,13 @@ int32 OS_Posix_InternalTaskCreate_Impl(pthread_t *pthr, const char *taskname, os /* Set threadname for debugging */ //OS_printf("pthread_setname_np to %s in OS_TaskCreate\n", taskname); - return_code = pthread_setname_np(*pthr, taskname); + pthread_setname_np(*pthr, taskname); + //return_code = pthread_setname_np(*pthr, taskname); //if (return_code != 0) //{ // OS_printf("pthread_setname_np error in OS_TaskCreate: %s\n",strerror(return_code)); //} - /* ** Free the resources that are no longer needed ** Since the task is now running - pthread_create() was successful - @@ -726,11 +726,11 @@ int32 OS_TaskDelay_Impl(uint32 millisecond) sleep_end.tv_sec = millisecond / 1000; sleep_end.tv_nsec = 1000000 * (millisecond % 1000); - if (sleep_end.tv_nsec >= 1000000000) - { - sleep_end.tv_nsec -= 1000000000; - ++sleep_end.tv_sec; - } + //if (sleep_end.tv_nsec >= 1000000000) + //{ + // sleep_end.tv_nsec -= 1000000000; + // ++sleep_end.tv_sec; + //} do {