summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/mqueueimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-18 07:25:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-18 15:36:58 +0100
commitc904df573396d95957dc79b242b3a76911063089 (patch)
treebe6406676689018e8af8a929b6a4ef5284f94c70 /cpukit/posix/include/rtems/posix/mqueueimpl.h
parentsptests/sptls02: Use GNU++11 (diff)
downloadrtems-c904df573396d95957dc79b242b3a76911063089.tar.bz2
score: Add _Objects_Get_by_name()
Replace _Objects_Name_to_id_string() with _Objects_Get_by_name() since all users of this function are interested in the object itself and not the identifier. Use the object allocator lock to protect the search. Update #2555.
Diffstat (limited to 'cpukit/posix/include/rtems/posix/mqueueimpl.h')
-rw-r--r--cpukit/posix/include/rtems/posix/mqueueimpl.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/cpukit/posix/include/rtems/posix/mqueueimpl.h b/cpukit/posix/include/rtems/posix/mqueueimpl.h
index 6646fa2c65..cf0f76af32 100644
--- a/cpukit/posix/include/rtems/posix/mqueueimpl.h
+++ b/cpukit/posix/include/rtems/posix/mqueueimpl.h
@@ -246,17 +246,20 @@ _POSIX_Message_queue_Get_fd_interrupt_disable(
lock_context
);
}
-
-/**
- * @see _POSIX_Name_to_id().
- */
-RTEMS_INLINE_ROUTINE int _POSIX_Message_queue_Name_to_id(
- const char *name,
- Objects_Id *id,
- size_t *len
+
+RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *
+_POSIX_Message_queue_Get_by_name(
+ const char *name,
+ size_t *name_length_p,
+ Objects_Get_by_name_error *error
)
{
- return _POSIX_Name_to_id( &_POSIX_Message_queue_Information, name, id, len );
+ return (POSIX_Message_queue_Control *) _Objects_Get_by_name(
+ &_POSIX_Message_queue_Information,
+ name,
+ name_length_p,
+ error
+ );
}
#ifdef __cplusplus