OSDN Git Service

hide some functions to cut down on relocations
authorMike Frysinger <vapier@gentoo.org>
Thu, 29 Dec 2005 04:39:12 +0000 (04:39 -0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 29 Dec 2005 04:39:12 +0000 (04:39 -0000)
librt/mq_getsetattr.c
librt/mq_receive.c
librt/mq_send.c

index 4ffda26..d412bee 100644 (file)
@@ -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
index 8726bbe..25e3bd2 100644 (file)
@@ -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);
 }
index 218157b..6425759 100644 (file)
@@ -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);
 }