Browse Source

hide some functions to cut down on relocations

Mike Frysinger 19 years ago
parent
commit
9133430793
3 changed files with 12 additions and 6 deletions
  1. 4 2
      librt/mq_getsetattr.c
  2. 4 2
      librt/mq_receive.c
  3. 4 2
      librt/mq_send.c

+ 4 - 2
librt/mq_getsetattr.c

@@ -18,16 +18,18 @@ static inline _syscall3(int, __syscall_mq_getsetattr, int, mqdes,
  * Set attributes associated with message queue (and possibly also get
  * its old attributes)
  */
-int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
+attribute_hidden
+int __mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
 		struct mq_attr *omqstat)
 {
     return __syscall_mq_getsetattr(mqdes, mqstat, omqstat);
 }
+strong_alias(__mq_setattr,mq_setattr)
 
 /* Query status and attributes of message queue */
 int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat)
 {
-    return mq_setattr(mqdes, NULL, mqstat);
+    return __mq_setattr(mqdes, NULL, mqstat);
 }
 
 #endif

+ 4 - 2
librt/mq_receive.c

@@ -19,7 +19,8 @@ static inline _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
  * Receive the oldest from highest priority messages.
  * Stop waiting if abs_timeout expires.
  */
-ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
+attribute_hidden
+ssize_t __mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
 			unsigned int *msg_prio,
 			const struct timespec *abs_timeout)
 {
@@ -30,10 +31,11 @@ ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
 	return -1;
 #endif
 }
+strong_alias(__mq_timedreceive,mq_timedreceive)
 
 /* Receive the oldest from highest priority messages */
 ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
 			unsigned int *msg_prio)
 {
-	return mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL);
+	return __mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL);
 }

+ 4 - 2
librt/mq_send.c

@@ -19,7 +19,8 @@ static inline _syscall5(int, __syscall_mq_timedsend, int, mqdes,
  * Add a message to queue. If O_NONBLOCK is set and queue is full, wait
  * for sufficient room in the queue until abs_timeout expires.
  */
-int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+attribute_hidden
+int __mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
 		unsigned int msg_prio,
 		const struct timespec *abs_timeout)
 {
@@ -30,10 +31,11 @@ int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
 	return -1;
 #endif
 }
+strong_alias(__mq_timedsend,mq_timedsend)
 
 /* Add a message to queue */
 int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
 		unsigned int msg_prio)
 {
-	return mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);
+	return __mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);
 }