svn commit: branches/uClibc-nptl/librt
carmelo at uclibc.org
carmelo at uclibc.org
Fri Apr 25 17:28:42 UTC 2008
Author: carmelo
Date: 2008-04-25 10:28:41 -0700 (Fri, 25 Apr 2008)
New Revision: 21868
Log:
STEP 12: synch librt directory
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
Modified:
branches/uClibc-nptl/librt/mq_close.c
branches/uClibc-nptl/librt/mq_getsetattr.c
branches/uClibc-nptl/librt/mq_notify.c
branches/uClibc-nptl/librt/mq_open.c
branches/uClibc-nptl/librt/mq_receive.c
branches/uClibc-nptl/librt/mq_send.c
branches/uClibc-nptl/librt/mq_unlink.c
branches/uClibc-nptl/librt/timer_delete.c
branches/uClibc-nptl/librt/timer_getoverr.c
branches/uClibc-nptl/librt/timer_gettime.c
branches/uClibc-nptl/librt/timer_settime.c
Changeset:
Modified: branches/uClibc-nptl/librt/mq_close.c
===================================================================
--- branches/uClibc-nptl/librt/mq_close.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_close.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -16,7 +16,7 @@
*/
int mq_close(mqd_t mqdes)
{
- return close(mqdes);
+ return close(mqdes);
}
#endif
Modified: branches/uClibc-nptl/librt/mq_getsetattr.c
===================================================================
--- branches/uClibc-nptl/librt/mq_getsetattr.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_getsetattr.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -11,26 +11,26 @@
#ifdef __NR_mq_getsetattr
librt_hidden_proto(mq_setattr)
-
#define __NR___syscall_mq_getsetattr __NR_mq_getsetattr
static inline _syscall3(int, __syscall_mq_getsetattr, int, mqdes,
- const void *, mqstat, void *, omqstat);
+ const void *, mqstat, void *, omqstat);
/*
* Set attributes associated with message queue (and possibly also get
* its old attributes)
*/
int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
- struct mq_attr *omqstat)
+ struct mq_attr *omqstat)
{
- return __syscall_mq_getsetattr(mqdes, mqstat, omqstat);
+ return __syscall_mq_getsetattr(mqdes, mqstat, omqstat);
}
+
librt_hidden_def(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
Modified: branches/uClibc-nptl/librt/mq_notify.c
===================================================================
--- branches/uClibc-nptl/librt/mq_notify.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_notify.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -12,17 +12,17 @@
#define __NR___syscall_mq_notify __NR_mq_notify
static inline _syscall2(int, __syscall_mq_notify, int, mqdes,
- const void *, notification);
+ const void *, notification);
/* Register notification upon message arrival to an empty message queue */
int mq_notify(mqd_t mqdes, const struct sigevent *notification)
{
- /* We don't support SIGEV_THREAD notification yet */
- if (notification != NULL && notification->sigev_notify == SIGEV_THREAD) {
- __set_errno(ENOSYS);
- return -1;
- }
- return __syscall_mq_notify(mqdes, notification);
+ /* We don't support SIGEV_THREAD notification yet */
+ if (notification != NULL && notification->sigev_notify == SIGEV_THREAD) {
+ __set_errno(ENOSYS);
+ return -1;
+ }
+ return __syscall_mq_notify(mqdes, notification);
}
#endif
Modified: branches/uClibc-nptl/librt/mq_open.c
===================================================================
--- branches/uClibc-nptl/librt/mq_open.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_open.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -13,7 +13,7 @@
#define __NR___syscall_mq_open __NR_mq_open
static inline _syscall4(int, __syscall_mq_open, const char *, name,
- int, oflag, __kernel_mode_t, mode, void *, attr);
+ int, oflag, __kernel_mode_t, mode, void *, attr);
/*
* Establish connection between a process and a message queue and
* return message queue descriptor or (mqd_t) -1 on error.
@@ -25,28 +25,28 @@
*/
mqd_t mq_open(const char *name, int oflag, ...)
{
- mode_t mode;
- struct mq_attr *attr;
+ mode_t mode;
+ struct mq_attr *attr;
- if (name[0] != '/') {
- __set_errno(EINVAL);
- return -1;
- }
+ if (name[0] != '/') {
+ __set_errno(EINVAL);
+ return -1;
+ }
- mode = 0;
- attr = NULL;
+ mode = 0;
+ attr = NULL;
- if (oflag & O_CREAT) {
- va_list ap;
+ if (oflag & O_CREAT) {
+ va_list ap;
- va_start(ap, oflag);
- mode = va_arg(ap, mode_t);
- attr = va_arg(ap, struct mq_attr *);
+ va_start(ap, oflag);
+ mode = va_arg(ap, mode_t);
+ attr = va_arg(ap, struct mq_attr *);
- va_end(ap);
- }
+ va_end(ap);
+ }
- return __syscall_mq_open(name + 1, oflag, mode, attr);
+ return __syscall_mq_open(name + 1, oflag, mode, attr);
}
#endif
Modified: branches/uClibc-nptl/librt/mq_receive.c
===================================================================
--- branches/uClibc-nptl/librt/mq_receive.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_receive.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -13,8 +13,8 @@
#ifdef __NR_mq_timedreceive
#define __NR___syscall_mq_timedreceive __NR_mq_timedreceive
static inline _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
- char *, msg_ptr, size_t, msg_len, unsigned int *, msg_prio,
- const void *, abs_timeout);
+ char *, msg_ptr, size_t, msg_len, unsigned int *,
+ msg_prio, const void *, abs_timeout);
#endif
/*
@@ -26,18 +26,20 @@
const struct timespec *abs_timeout)
{
#ifdef __NR_mq_timedreceive
- return __syscall_mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
+ return __syscall_mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio,
+ abs_timeout);
#else
errno = ENOSYS;
return -1;
#endif
}
+
librt_hidden_def(mq_timedreceive)
#endif
/* 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)
+ unsigned int *msg_prio)
{
return mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, NULL);
}
Modified: branches/uClibc-nptl/librt/mq_send.c
===================================================================
--- branches/uClibc-nptl/librt/mq_send.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_send.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -13,8 +13,8 @@
#ifdef __NR_mq_timedsend
#define __NR___syscall_mq_timedsend __NR_mq_timedsend
static inline _syscall5(int, __syscall_mq_timedsend, int, mqdes,
- const char *, msg_ptr, size_t, msg_len, unsigned int, msg_prio,
- const void *, abs_timeout);
+ const char *, msg_ptr, size_t, msg_len, unsigned int,
+ msg_prio, const void *, abs_timeout);
#endif
/*
@@ -22,22 +22,23 @@
* for sufficient room in the queue until abs_timeout expires.
*/
int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
- unsigned int msg_prio,
- const struct timespec *abs_timeout)
+ unsigned int msg_prio, const struct timespec *abs_timeout)
{
#ifdef __NR_mq_timedsend
- return __syscall_mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
+ return __syscall_mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio,
+ abs_timeout);
#else
errno = ENOSYS;
return -1;
#endif
}
+
librt_hidden_def(mq_timedsend)
#endif
/* Add a message to queue */
int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
- unsigned int msg_prio)
+ unsigned int msg_prio)
{
return mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, NULL);
}
Modified: branches/uClibc-nptl/librt/mq_unlink.c
===================================================================
--- branches/uClibc-nptl/librt/mq_unlink.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/mq_unlink.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -15,24 +15,25 @@
/* Remove message queue */
int mq_unlink(const char *name)
{
- int ret;
- if (name[0] != '/') {
- __set_errno(EINVAL);
- return -1;
- }
+ int ret;
- ret = __syscall_mq_unlink(name + 1);
+ if (name[0] != '/') {
+ __set_errno(EINVAL);
+ return -1;
+ }
- /* While unlink can return either EPERM or EACCES, mq_unlink should return just EACCES. */
- if (ret < 0) {
- ret = errno;
- if (ret == EPERM)
- ret = EACCES;
- __set_errno(ret);
- ret = -1;
- }
+ ret = __syscall_mq_unlink(name + 1);
- return ret;
+ /* While unlink can return either EPERM or EACCES, mq_unlink should return just EACCES. */
+ if (ret < 0) {
+ ret = errno;
+ if (ret == EPERM)
+ ret = EACCES;
+ __set_errno(ret);
+ ret = -1;
+ }
+
+ return ret;
}
#endif
Modified: branches/uClibc-nptl/librt/timer_delete.c
===================================================================
--- branches/uClibc-nptl/librt/timer_delete.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/timer_delete.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -17,17 +17,17 @@
/* Delete a per-process timer */
int timer_delete(timer_t timerid)
{
- int res;
- struct timer *kt = (struct timer *) timerid;
+ int res;
+ struct timer *kt = (struct timer *)timerid;
- /* Delete the kernel timer object */
- res = __syscall_timer_delete(kt->ktimerid);
- if (res == 0) {
- free(kt); /* Free the memory */
- return 0;
- }
+ /* Delete the kernel timer object */
+ res = __syscall_timer_delete(kt->ktimerid);
+ if (res == 0) {
+ free(kt); /* Free the memory */
+ return 0;
+ }
- return -1;
+ return -1;
}
#endif
Modified: branches/uClibc-nptl/librt/timer_getoverr.c
===================================================================
--- branches/uClibc-nptl/librt/timer_getoverr.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/timer_getoverr.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -11,15 +11,16 @@
#ifdef __NR_timer_getoverrun
#define __NR___syscall_timer_getoverrun __NR_timer_getoverrun
-static inline _syscall1(int, __syscall_timer_getoverrun, kernel_timer_t, ktimerid);
+static inline _syscall1(int, __syscall_timer_getoverrun, kernel_timer_t,
+ ktimerid);
/* Get the timer overrun count */
int timer_getoverrun(timer_t timerid)
{
- struct timer *kt = (struct timer *) timerid;
+ struct timer *kt = (struct timer *)timerid;
- /* Get the information from the kernel */
- return __syscall_timer_getoverrun(kt->ktimerid);
+ /* Get the information from the kernel */
+ return __syscall_timer_getoverrun(kt->ktimerid);
}
#endif
Modified: branches/uClibc-nptl/librt/timer_gettime.c
===================================================================
--- branches/uClibc-nptl/librt/timer_gettime.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/timer_gettime.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -12,15 +12,16 @@
#ifdef __NR_timer_gettime
#define __NR___syscall_timer_gettime __NR_timer_gettime
-static inline _syscall2(int, __syscall_timer_gettime, kernel_timer_t, ktimerid, void *, value);
+static inline _syscall2(int, __syscall_timer_gettime, kernel_timer_t, ktimerid,
+ void *, value);
/* Get the amount of time left on a timer */
int timer_gettime(timer_t timerid, struct itimerspec *value)
{
- struct timer *kt = (struct timer *) timerid;
+ struct timer *kt = (struct timer *)timerid;
- /* Get timeout from the kernel */
- return __syscall_timer_gettime(kt->ktimerid, value);
+ /* Get timeout from the kernel */
+ return __syscall_timer_gettime(kt->ktimerid, value);
}
#endif
Modified: branches/uClibc-nptl/librt/timer_settime.c
===================================================================
--- branches/uClibc-nptl/librt/timer_settime.c 2008-04-25 17:27:35 UTC (rev 21867)
+++ branches/uClibc-nptl/librt/timer_settime.c 2008-04-25 17:28:41 UTC (rev 21868)
@@ -13,16 +13,16 @@
#define __NR___syscall_timer_settime __NR_timer_settime
static inline _syscall4(int, __syscall_timer_settime, kernel_timer_t, ktimerid,
- int, flags, const void *, value, void *, ovalue);
+ int, flags, const void *, value, void *, ovalue);
/* Set the expiration time for a timer */
int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
- struct itimerspec *ovalue)
+ struct itimerspec *ovalue)
{
- struct timer *kt = (struct timer *) timerid;
+ struct timer *kt = (struct timer *)timerid;
- /* Set timeout */
- return __syscall_timer_settime(kt->ktimerid, flags, value, ovalue);
+ /* Set timeout */
+ return __syscall_timer_settime(kt->ktimerid, flags, value, ovalue);
}
#endif
More information about the uClibc-cvs
mailing list