Skip to content

Commit

Permalink
Merge branch 'nos3#226-64bit' into nos3-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucas9 committed Mar 6, 2024
2 parents d45f883 + 19a19de commit 570ad09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/os/nos/src/NOS-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int NOS_timer_create (clockid_t clock_id, struct sigevent * evp, timer_t * timer
errno = ENOMEM;
retval = -1;
} else {
*timerid = (void *)i;
*timerid = (void*) (long) i;
NOS_timer_table[i].in_use = 1;
NOS_timer_table[i].evp = *evp;
retval = 0;
Expand All @@ -123,7 +123,7 @@ int NOS_timer_create (clockid_t clock_id, struct sigevent * evp, timer_t * timer
int NOS_timer_delete (timer_t timerid)
{
int retval = 0;
int i = (int)timerid;
int i = (long) timerid;
pthread_mutex_lock(&NOS_timer_table_mutex);
if ((i < 0) || (i >= OS_MAX_TIMEBASES)) {
errno = EINVAL;
Expand All @@ -147,7 +147,7 @@ int NOS_timer_settime (timer_t timerid, int flags, const struct itimerspec * val
{
// Only call passes ovalue = NULL, so don't need to do anything with it
int retval = 0;
int i = (int)timerid;
int i = (long) timerid;
pthread_mutex_lock(&NOS_timer_table_mutex);
if ((i < 0) || (i >= OS_MAX_TIMEBASES)) {
errno = EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion src/os/nos/src/os-impl-timebase.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ int32 OS_TimeBaseCreate_Impl(const OS_object_token_t *token)
local = OS_OBJECT_TABLE_GET(OS_impl_timebase_table, *token);
timebase = OS_OBJECT_TABLE_GET(OS_timebase_table, *token);

snprintf(timer_name, sizeof(timer_name), "timer.%d", (int)local->host_timerid);
snprintf(timer_name, sizeof(timer_name), "timer.%ld", (long)local->host_timerid);

/*
* Spawn a dedicated time base handler thread
Expand Down

0 comments on commit 570ad09

Please sign in to comment.