Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time and timeouts have no consistent type in OSAL #571

Open
ghost opened this issue Aug 20, 2020 · 1 comment
Open

time and timeouts have no consistent type in OSAL #571

ghost opened this issue Aug 20, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 20, 2020

In OSAL, time and timeouts are represented typically by both int32 or uint32. This convention is used in many places. It might make sense to have a consistent type for time. Perhaps even absolute and relative time. There are Wconversion issues with uses of these types.

@skliper
Copy link
Contributor

skliper commented Dec 9, 2020

Looks like some timeouts handle OS_PEND (-1). although inconsistent use of int32/uint32.

Example code snips:

/** @brief OSAL time */
typedef struct
{
uint32 seconds;
uint32 microsecs;
} OS_time_t;

int32 OS_TaskDelay(uint32 millisecond);

int32 OS_QueueGet(osal_id_t queue_id, void *data, size_t size, size_t *size_copied, int32 timeout);

int32 OS_BinSemTimedWait(osal_id_t sem_id, uint32 msecs);

int32 OS_CountSemTimedWait(osal_id_t sem_id, uint32 msecs);

int32 OS_SelectMultiple(OS_FdSet *ReadSet, OS_FdSet *WriteSet, int32 msecs);

jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Document change only, updates the interrupt
handler section to note OSAL deprecation
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant