From f1115fcba6a5ca47d35ee6166a2109b38d35b60c Mon Sep 17 00:00:00 2001 From: Chris Knight Date: Wed, 25 Mar 2020 20:19:44 -0700 Subject: [PATCH] fix for #392 - moves OS_STREAM_STATE... to os/inc/osapi-os-core.h as it's needed by OS_SelectSingle() --- src/os/inc/osapi-os-core.h | 15 ++++++++++++--- src/os/shared/os-impl.h | 8 -------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/os/inc/osapi-os-core.h b/src/os/inc/osapi-os-core.h index d7df853d5..e87fa1c66 100644 --- a/src/os/inc/osapi-os-core.h +++ b/src/os/inc/osapi-os-core.h @@ -110,6 +110,15 @@ typedef struct }OS_heap_prop_t; +typedef enum +{ + OS_STREAM_STATE_BOUND = 0x01, + OS_STREAM_STATE_CONNECTED = 0x02, + OS_STREAM_STATE_READABLE = 0x04, + OS_STREAM_STATE_WRITABLE = 0x08, +} OS_StreamState_t; + + /* This typedef is for the OS_GetErrorName function, to ensure * everyone is making an array of the same length. * @@ -1231,9 +1240,9 @@ int32 OS_SelectMultiple(OS_FdSet *ReadSet, OS_FdSet *WriteSet, int32 msecs); * * This function can be used to wait for a single OSAL stream ID * to become readable or writable. On entry, the "StateFlags" - * parameter should be set to the desired state (readble or writable) - * and upon return the flags will be set to the state actually - * detected. + * parameter should be set to the desired state (OS_STREAM_STATE_READABLE + * and/or OS_STREAM_STATE_WRITABLE) and upon return the flags + * will be set to the state actually detected. * * As this operates on a single ID, the filehandle is protected * during this call, such that another thread accessing the same diff --git a/src/os/shared/os-impl.h b/src/os/shared/os-impl.h index aba3434d6..d20b4b9f3 100644 --- a/src/os/shared/os-impl.h +++ b/src/os/shared/os-impl.h @@ -105,14 +105,6 @@ typedef struct uint16 flags; }OS_common_record_t; -typedef enum -{ - OS_STREAM_STATE_BOUND = 0x01, - OS_STREAM_STATE_CONNECTED = 0x02, - OS_STREAM_STATE_READABLE = 0x04, - OS_STREAM_STATE_WRITABLE = 0x08, -} OS_StreamState_t; - /*tasks */ typedef struct {