summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/include/rtems/termiostypes.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-03 10:49:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-03 10:49:13 +0100
commit85ed95ec4808d021be50a1ab1f476476a09c5a22 (patch)
tree8ed250bca465fd3394d7c5f273efc51f761d69f9 /cpukit/libcsupport/include/rtems/termiostypes.h
parentscore: Move _Thread_Scheduler_ask_for_help() (diff)
downloadrtems-85ed95ec4808d021be50a1ab1f476476a09c5a22.tar.bz2
termios: Fix static device initalization
This enables early printk() support. Update #2838.
Diffstat (limited to 'cpukit/libcsupport/include/rtems/termiostypes.h')
-rw-r--r--cpukit/libcsupport/include/rtems/termiostypes.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/cpukit/libcsupport/include/rtems/termiostypes.h b/cpukit/libcsupport/include/rtems/termiostypes.h
index ffe172c439..3cf6bebe19 100644
--- a/cpukit/libcsupport/include/rtems/termiostypes.h
+++ b/cpukit/libcsupport/include/rtems/termiostypes.h
@@ -90,6 +90,16 @@ typedef struct rtems_termios_device_context {
);
} rtems_termios_device_context;
+void rtems_termios_device_lock_acquire_default(
+ rtems_termios_device_context *ctx,
+ rtems_interrupt_lock_context *lock_context
+);
+
+void rtems_termios_device_lock_release_default(
+ rtems_termios_device_context *ctx,
+ rtems_interrupt_lock_context *lock_context
+);
+
/**
* @brief Initializes a device context.
*
@@ -104,6 +114,8 @@ RTEMS_INLINE_ROUTINE void rtems_termios_device_context_initialize(
)
{
rtems_interrupt_lock_initialize( &context->lock.interrupt, name );
+ context->lock_acquire = rtems_termios_device_lock_acquire_default;
+ context->lock_release = rtems_termios_device_lock_release_default;
}
/**
@@ -113,7 +125,11 @@ RTEMS_INLINE_ROUTINE void rtems_termios_device_context_initialize(
* is only used if profiling is enabled.
*/
#define RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER( name ) \
- { { RTEMS_INTERRUPT_LOCK_INITIALIZER( name ) } }
+ { \
+ { RTEMS_INTERRUPT_LOCK_INITIALIZER( name ) }, \
+ rtems_termios_device_lock_acquire_default, \
+ rtems_termios_device_lock_release_default \
+ }
/**
* @brief Termios device handler.