diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-12-13 12:56:53 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-12-13 12:56:53 +0000 |
commit | b98d399f3c4f7fc19a80a7f12503f0b4226c59dc (patch) | |
tree | 82a06feb8b1ac21527aee2be7c7c3cd37a7e70b9 /cpukit/posix/inline | |
parent | 2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-b98d399f3c4f7fc19a80a7f12503f0b4226c59dc.tar.bz2 |
2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* posix/src/mqueuenametoid.c,
posix/src/semaphorenametoid.c: Removed files.
* posix/src/psxnametoid.c: New file.
* posix/Makefile.am: Reflect changes above.
* posix/include/rtems/posix/config.h: Fixed integer types.
* posix/include/rtems/posix/posixapi.h: Declare _POSIX_Name_to_id().
* posix/include/rtems/posix/mqueue.h,
posix/inline/rtems/posix/mqueue.inl: Changed parameter of
_POSIX_Message_queue_Create_support().
_POSIX_Message_queue_Name_to_id() is now inline.
* posix/include/rtems/posix/semaphore.h,
posix/inline/rtems/posix/semaphore.inl: Changed parameter of
_POSIX_Semaphore_Create_support(). _POSIX_Semaphore_Name_to_id() is
now inline.
* posix/src/mqueuecreatesupp.c, posix/src/semaphorecreatesupp.c: Use
_Workspace_String_duplicate().
* posix/src/mqueuesendsupp.c, posix/src/mqueueopen.c,
posix/src/mqueueunlink.c, posix/src/seminit.c, posix/src/semopen.c,
posix/src/semunlink.c: Update due to API changes.
Diffstat (limited to 'cpukit/posix/inline')
-rw-r--r-- | cpukit/posix/inline/rtems/posix/mqueue.inl | 16 | ||||
-rw-r--r-- | cpukit/posix/inline/rtems/posix/semaphore.inl | 12 |
2 files changed, 26 insertions, 2 deletions
diff --git a/cpukit/posix/inline/rtems/posix/mqueue.inl b/cpukit/posix/inline/rtems/posix/mqueue.inl index cd0dd8b230..d64e7c35e6 100644 --- a/cpukit/posix/inline/rtems/posix/mqueue.inl +++ b/cpukit/posix/inline/rtems/posix/mqueue.inl @@ -127,7 +127,7 @@ RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priori unsigned int priority ) { - return priority * -1; + return (CORE_message_queue_Submit_types) priority * -1; } /* @@ -143,7 +143,19 @@ RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( ) { /* absolute value without a library dependency */ - return ((priority >= 0) ? priority : -priority); + return (unsigned int) ((priority >= 0) ? priority : -priority); +} + +/** + * @see _POSIX_Name_to_id(). + */ +RTEMS_INLINE_ROUTINE int _POSIX_Message_queue_Name_to_id( + const char *name, + Objects_Id *id, + size_t *len +) +{ + return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len ); } #endif diff --git a/cpukit/posix/inline/rtems/posix/semaphore.inl b/cpukit/posix/inline/rtems/posix/semaphore.inl index ae1cd3a1fe..62256c072e 100644 --- a/cpukit/posix/inline/rtems/posix/semaphore.inl +++ b/cpukit/posix/inline/rtems/posix/semaphore.inl @@ -81,6 +81,18 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_null ( return !the_semaphore; } +/** + * @see _POSIX_Name_to_id(). + */ +RTEMS_INLINE_ROUTINE int _POSIX_Semaphore_Name_to_id( + const char *name, + Objects_Id *id, + size_t *len +) +{ + return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len ); +} + #endif /* end of include file */ |