From b98d399f3c4f7fc19a80a7f12503f0b4226c59dc Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 13 Dec 2011 12:56:53 +0000 Subject: 2011-12-13 Sebastian Huber * 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. --- cpukit/posix/inline/rtems/posix/mqueue.inl | 16 ++++++++++++++-- cpukit/posix/inline/rtems/posix/semaphore.inl | 12 ++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'cpukit/posix/inline') 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 */ -- cgit v1.2.3