summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/termiostypes.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-28 06:30:35 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-02 15:01:21 +0100
commit2c12262f9a8fe7975556729f0574fab8d5a792f5 (patch)
tree0a4a0bea0900fd682d40fb1d628c5e922aab85b8 /cpukit/include/rtems/termiostypes.h
parentlibblock: Use self-contained mutex and cond var (diff)
downloadrtems-2c12262f9a8fe7975556729f0574fab8d5a792f5.tar.bz2
termios: Use self-contained objects
Update #2840.
Diffstat (limited to 'cpukit/include/rtems/termiostypes.h')
-rw-r--r--cpukit/include/rtems/termiostypes.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/include/rtems/termiostypes.h b/cpukit/include/rtems/termiostypes.h
index b3cac66e92..db88cada8b 100644
--- a/cpukit/include/rtems/termiostypes.h
+++ b/cpukit/include/rtems/termiostypes.h
@@ -20,6 +20,7 @@
#include <rtems/libio.h>
#include <rtems/assoc.h>
#include <rtems/chain.h>
+#include <rtems/thread.h>
#include <sys/ioccom.h>
#include <stdint.h>
#include <termios.h>
@@ -52,7 +53,7 @@ struct rtems_termios_rawbuf {
volatile unsigned int Head;
volatile unsigned int Tail;
volatile unsigned int Size;
- rtems_id Semaphore;
+ rtems_binary_semaphore Semaphore;
};
typedef enum {
@@ -77,7 +78,7 @@ typedef struct rtems_termios_device_context {
rtems_interrupt_lock interrupt;
/* Used for TERMIOS_IRQ_SERVER_DRIVEN or TERMIOS_TASK_DRIVEN */
- rtems_id mutex;
+ rtems_mutex mutex;
} lock;
void ( *lock_acquire )(
@@ -300,8 +301,8 @@ typedef struct rtems_termios_tty {
/*
* Mutual-exclusion semaphores
*/
- rtems_id isem;
- rtems_id osem;
+ rtems_mutex isem;
+ rtems_mutex osem;
/*
* The canonical (cooked) character buffer
@@ -326,7 +327,7 @@ typedef struct rtems_termios_tty {
* Raw input character buffer
*/
struct rtems_termios_rawbuf rawInBuf;
- uint32_t rawInBufSemaphoreOptions;
+ bool rawInBufSemaphoreWait;
rtems_interval rawInBufSemaphoreTimeout;
rtems_interval rawInBufSemaphoreFirstTimeout;
unsigned int rawInBufDropped; /* Statistics */
@@ -595,6 +596,8 @@ int rtems_termios_poll(
#define RTEMS_TERMIOS_NUMBER_BAUD_RATES 25
+extern rtems_mutex rtems_termios_ttyMutex;
+
#ifdef __cplusplus
}
#endif