[Xenomai-git] Philippe Gerum : lib/cobalt: add API context tags
Module: xenomai-3 Branch: master Commit: b0cf167b7e9b181967eb5c618296729c03990db5 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b0cf167b7e9b181967eb5c618296729c03990db5 Author: Philippe GerumDate: Thu Oct 1 21:27:40 2015 +0200 lib/cobalt: add API context tags --- lib/cobalt/clock.c | 11 +++ lib/cobalt/cond.c | 15 ++- lib/cobalt/mq.c| 11 +++ lib/cobalt/mutex.c | 14 ++ lib/cobalt/sched.c | 17 - lib/cobalt/semaphore.c | 19 +++ lib/cobalt/thread.c| 15 ++- lib/cobalt/timer.c |8 lib/copperplate/init.c | 44 +++- 9 files changed, 134 insertions(+), 20 deletions(-) diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c index 3fe6658..0450019 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -95,6 +95,7 @@ * http://www.opengroup.org/onlinepubs/95399/functions/clock_getres.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_getres, (clockid_t clock_id, struct timespec *tp)) { @@ -175,6 +176,7 @@ static int __do_clock_host_realtime(struct timespec *ts) * http://www.opengroup.org/onlinepubs/95399/functions/clock_gettime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) { @@ -229,6 +231,7 @@ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_settime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) { @@ -281,6 +284,7 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, int flags, @@ -326,6 +330,7 @@ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, * http://www.opengroup.org/onlinepubs/95399/functions/nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)) { @@ -340,6 +345,8 @@ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp) return 0; } +/* @apitags{thread-unrestricted, switch-primary} */ + COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) { struct timespec rqt, rem; @@ -357,6 +364,8 @@ COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) return 0; } +/* @apitags{unrestricted} */ + COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) { struct timespec ts; @@ -368,6 +377,8 @@ COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) return ret; } +/* @apitags{unrestricted} */ + COBALT_IMPL(time_t, time, (time_t *t)) { struct timespec ts; diff --git a/lib/cobalt/cond.c b/lib/cobalt/cond.c index bb9e84c..19ef372 100644 --- a/lib/cobalt/cond.c +++ b/lib/cobalt/cond.c @@ -107,6 +107,8 @@ void cobalt_default_condattr_init(void) * @see * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_init.html;> * Specification. + * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, const pthread_condattr_t * attr)) @@ -161,6 +163,7 @@ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_destroy.html;> * Specification. * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_destroy, (pthread_cond_t *cond)) { @@ -245,6 +248,7 @@ static int __attribute__((cold)) cobalt_cond_autoinit(pthread_cond_t *cond) * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_wait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex)) { @@ -338,6 +342,7 @@ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mute * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_timedwait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -418,7 +423,8 @@ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_signal.html.;> * Specification. * - */ + * @apitags{xthread-only} +*/ COBALT_IMPL(int, pthread_cond_signal, (pthread_cond_t *cond)) {
[Xenomai-git] Philippe Gerum : lib/cobalt: add API context tags
Module: xenomai-3 Branch: arm64 Commit: b0cf167b7e9b181967eb5c618296729c03990db5 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b0cf167b7e9b181967eb5c618296729c03990db5 Author: Philippe GerumDate: Thu Oct 1 21:27:40 2015 +0200 lib/cobalt: add API context tags --- lib/cobalt/clock.c | 11 +++ lib/cobalt/cond.c | 15 ++- lib/cobalt/mq.c| 11 +++ lib/cobalt/mutex.c | 14 ++ lib/cobalt/sched.c | 17 - lib/cobalt/semaphore.c | 19 +++ lib/cobalt/thread.c| 15 ++- lib/cobalt/timer.c |8 lib/copperplate/init.c | 44 +++- 9 files changed, 134 insertions(+), 20 deletions(-) diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c index 3fe6658..0450019 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -95,6 +95,7 @@ * http://www.opengroup.org/onlinepubs/95399/functions/clock_getres.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_getres, (clockid_t clock_id, struct timespec *tp)) { @@ -175,6 +176,7 @@ static int __do_clock_host_realtime(struct timespec *ts) * http://www.opengroup.org/onlinepubs/95399/functions/clock_gettime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) { @@ -229,6 +231,7 @@ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_settime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) { @@ -281,6 +284,7 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, int flags, @@ -326,6 +330,7 @@ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, * http://www.opengroup.org/onlinepubs/95399/functions/nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)) { @@ -340,6 +345,8 @@ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp) return 0; } +/* @apitags{thread-unrestricted, switch-primary} */ + COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) { struct timespec rqt, rem; @@ -357,6 +364,8 @@ COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) return 0; } +/* @apitags{unrestricted} */ + COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) { struct timespec ts; @@ -368,6 +377,8 @@ COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) return ret; } +/* @apitags{unrestricted} */ + COBALT_IMPL(time_t, time, (time_t *t)) { struct timespec ts; diff --git a/lib/cobalt/cond.c b/lib/cobalt/cond.c index bb9e84c..19ef372 100644 --- a/lib/cobalt/cond.c +++ b/lib/cobalt/cond.c @@ -107,6 +107,8 @@ void cobalt_default_condattr_init(void) * @see * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_init.html;> * Specification. + * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, const pthread_condattr_t * attr)) @@ -161,6 +163,7 @@ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_destroy.html;> * Specification. * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_destroy, (pthread_cond_t *cond)) { @@ -245,6 +248,7 @@ static int __attribute__((cold)) cobalt_cond_autoinit(pthread_cond_t *cond) * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_wait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex)) { @@ -338,6 +342,7 @@ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mute * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_timedwait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -418,7 +423,8 @@ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_signal.html.;> * Specification. * - */ + * @apitags{xthread-only} +*/ COBALT_IMPL(int, pthread_cond_signal, (pthread_cond_t *cond)) {
[Xenomai-git] Philippe Gerum : lib/cobalt: add API context tags
Module: xenomai-3 Branch: next Commit: b0cf167b7e9b181967eb5c618296729c03990db5 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b0cf167b7e9b181967eb5c618296729c03990db5 Author: Philippe GerumDate: Thu Oct 1 21:27:40 2015 +0200 lib/cobalt: add API context tags --- lib/cobalt/clock.c | 11 +++ lib/cobalt/cond.c | 15 ++- lib/cobalt/mq.c| 11 +++ lib/cobalt/mutex.c | 14 ++ lib/cobalt/sched.c | 17 - lib/cobalt/semaphore.c | 19 +++ lib/cobalt/thread.c| 15 ++- lib/cobalt/timer.c |8 lib/copperplate/init.c | 44 +++- 9 files changed, 134 insertions(+), 20 deletions(-) diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c index 3fe6658..0450019 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -95,6 +95,7 @@ * http://www.opengroup.org/onlinepubs/95399/functions/clock_getres.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_getres, (clockid_t clock_id, struct timespec *tp)) { @@ -175,6 +176,7 @@ static int __do_clock_host_realtime(struct timespec *ts) * http://www.opengroup.org/onlinepubs/95399/functions/clock_gettime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) { @@ -229,6 +231,7 @@ COBALT_IMPL(int, clock_gettime, (clockid_t clock_id, struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_settime.html;> * Specification. * + * @apitags{unrestricted} */ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) { @@ -281,6 +284,7 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) * http://www.opengroup.org/onlinepubs/95399/functions/clock_nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, int flags, @@ -326,6 +330,7 @@ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, * http://www.opengroup.org/onlinepubs/95399/functions/nanosleep.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)) { @@ -340,6 +345,8 @@ COBALT_IMPL(int, nanosleep, (const struct timespec *rqtp, struct timespec *rmtp) return 0; } +/* @apitags{thread-unrestricted, switch-primary} */ + COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) { struct timespec rqt, rem; @@ -357,6 +364,8 @@ COBALT_IMPL(unsigned int, sleep, (unsigned int seconds)) return 0; } +/* @apitags{unrestricted} */ + COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) { struct timespec ts; @@ -368,6 +377,8 @@ COBALT_IMPL(int, gettimeofday, (struct timeval *tv, struct timezone *tz)) return ret; } +/* @apitags{unrestricted} */ + COBALT_IMPL(time_t, time, (time_t *t)) { struct timespec ts; diff --git a/lib/cobalt/cond.c b/lib/cobalt/cond.c index bb9e84c..19ef372 100644 --- a/lib/cobalt/cond.c +++ b/lib/cobalt/cond.c @@ -107,6 +107,8 @@ void cobalt_default_condattr_init(void) * @see * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_init.html;> * Specification. + * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, const pthread_condattr_t * attr)) @@ -161,6 +163,7 @@ COBALT_IMPL(int, pthread_cond_init, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_destroy.html;> * Specification. * + * @apitags{thread-unrestricted} */ COBALT_IMPL(int, pthread_cond_destroy, (pthread_cond_t *cond)) { @@ -245,6 +248,7 @@ static int __attribute__((cold)) cobalt_cond_autoinit(pthread_cond_t *cond) * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_wait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex)) { @@ -338,6 +342,7 @@ COBALT_IMPL(int, pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mute * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_timedwait.html;> * Specification. * + * @apitags{xthread-only, switch-primary} */ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -418,7 +423,8 @@ COBALT_IMPL(int, pthread_cond_timedwait, (pthread_cond_t *cond, * http://www.opengroup.org/onlinepubs/95399/functions/pthread_cond_signal.html.;> * Specification. * - */ + * @apitags{xthread-only} +*/ COBALT_IMPL(int, pthread_cond_signal, (pthread_cond_t *cond)) { struct