From 1358cc191181ef99bc2afdabd44cd5d41f61362e Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 30 Jan 2008 21:59:12 +0000 Subject: [PATCH] Fix z16f addressing issues git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@592 42af7a65-404d-4744-a932-0658087f49c3 --- configs/z16f2800100zcog/ostest/ostest.zfpproj | 473 +++++++++--------- include/fcntl.h | 10 +- include/pthread.h | 82 +-- sched/pthread_attrdestroy.c | 42 +- sched/pthread_attrgetinheritsched.c | 44 +- sched/pthread_attrgetschedparam.c | 44 +- sched/pthread_attrgetschedpolicy.c | 42 +- sched/pthread_attrgetstacksize.c | 38 +- sched/pthread_attrinit.c | 42 +- sched/pthread_attrsetinheritsched.c | 38 +- sched/pthread_attrsetschedparam.c | 44 +- sched/pthread_attrsetschedpolicy.c | 42 +- sched/pthread_attrsetstacksize.c | 38 +- sched/pthread_condattrdestroy.c | 22 +- sched/pthread_condattrinit.c | 24 +- sched/pthread_condbroadcast.c | 44 +- sched/pthread_conddestroy.c | 24 +- sched/pthread_condinit.c | 24 +- sched/pthread_condsignal.c | 44 +- sched/pthread_condtimedwait.c | 50 +- sched/pthread_condwait.c | 44 +- sched/pthread_create.c | 57 ++- sched/pthread_getschedparam.c | 43 +- sched/pthread_join.c | 42 +- sched/pthread_keycreate.c | 42 +- sched/pthread_mutexattrdestroy.c | 42 +- sched/pthread_mutexattrgetpshared.c | 42 +- sched/pthread_mutexattrinit.c | 42 +- sched/pthread_mutexattrsetpshared.c | 42 +- sched/pthread_mutexdestroy.c | 44 +- sched/pthread_mutexinit.c | 42 +- sched/pthread_mutexlock.c | 44 +- sched/pthread_mutextrylock.c | 44 +- sched/pthread_mutexunlock.c | 44 +- sched/pthread_setcancelstate.c | 42 +- sched/pthread_setschedparam.c | 43 +- sched/pthread_setspecific.c | 40 +- 37 files changed, 974 insertions(+), 976 deletions(-) diff --git a/configs/z16f2800100zcog/ostest/ostest.zfpproj b/configs/z16f2800100zcog/ostest/ostest.zfpproj index f0dfc3319fb..ade3d73d421 100644 --- a/configs/z16f2800100zcog/ostest/ostest.zfpproj +++ b/configs/z16f2800100zcog/ostest/ostest.zfpproj @@ -1,237 +1,238 @@ - -Z16F2811AL - - - -..\..\..\nuttx.hex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Z16F2811AL + + + +..\..\..\nuttx.hex + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/include/fcntl.h b/include/fcntl.h index 10780da2ce6..b4f0aa82a0d 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -112,11 +112,11 @@ struct flock { - short l_type; /* Type of lock: F_RDLCK, F_WRLCK, F_UNLCK */ - short l_whence; /* How to interpret l_start: SEEK_SET, SEEK_CUR, SEEK_END */ - off_t l_start; /* Starting offset for lock */ - off_t l_len; /* Number of bytes to lock */ - pid_t l_pid; /* PID of process blocking our lock (F_GETLK only) */ + sint16 l_type; /* Type of lock: F_RDLCK, F_WRLCK, F_UNLCK */ + sint16 l_whence; /* How to interpret l_start: SEEK_SET, SEEK_CUR, SEEK_END */ + off_t l_start; /* Starting offset for lock */ + off_t l_len; /* Number of bytes to lock */ + pid_t l_pid; /* PID of process blocking our lock (F_GETLK only) */ }; /******************************************************************************** diff --git a/include/pthread.h b/include/pthread.h index 0f4a027fe4a..6ce1e956458 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -1,7 +1,7 @@ /******************************************************************************** * pthread.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -128,7 +128,7 @@ typedef pthread_startroutine_t pthread_func_t; struct pthread_addr_s { size_t stacksize; /* Size of the stack allocated for the pthead */ - short priority; /* Priority of the pthread */ + sint16 priority; /* Priority of the pthread */ ubyte policy; /* Pthread scheduler policy */ ubyte inheritsched; /* Inherit parent prio/policy? */ }; @@ -190,7 +190,7 @@ struct sched_param; /* Defined in sched.h */ * the individual attributes used by a given implementation. */ -EXTERN int pthread_attr_init(pthread_attr_t *attr); +EXTERN int pthread_attr_init(FAR pthread_attr_t *attr); /* An attributes object can be deleted when it is no longer needed. */ @@ -198,20 +198,20 @@ EXTERN int pthread_attr_destroy(pthread_attr_t *attr); /* Set or obtain the default scheduling algorithm */ -EXTERN int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); -EXTERN int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy); -EXTERN int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param); -EXTERN int pthread_attr_getschedparam(pthread_attr_t *attr, - struct sched_param *param); -EXTERN int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched); -EXTERN int pthread_attr_getinheritsched(const pthread_attr_t *attr, - int *inheritsched); +EXTERN int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy); +EXTERN int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy); +EXTERN int pthread_attr_setschedparam(FAR pthread_attr_t *attr, + FAR const struct sched_param *param); +EXTERN int pthread_attr_getschedparam(FAR pthread_attr_t *attr, + FAR struct sched_param *param); +EXTERN int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, int inheritsched); +EXTERN int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, + FAR int *inheritsched); /* Set or obtain the default stack size */ -EXTERN int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize); -EXTERN int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr); +EXTERN int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize); +EXTERN int pthread_attr_getstacksize(FAR pthread_attr_t *attr, long *stackaddr); /* To create a thread object and runnable thread, a routine must be specified * as the new thread's start routine. An argument may be passed to this @@ -220,7 +220,7 @@ EXTERN int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr); * about the kind of thread being created. */ -EXTERN int pthread_create(pthread_t *thread, pthread_attr_t *attr, +EXTERN int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, pthread_startroutine_t startroutine, pthread_addr_t arg); @@ -236,14 +236,14 @@ EXTERN int pthread_detach(pthread_t thread); EXTERN void pthread_exit(pthread_addr_t value) noreturn_function; EXTERN int pthread_cancel(pthread_t thread); -EXTERN int pthread_setcancelstate(int state, int *oldstate); +EXTERN int pthread_setcancelstate(int state, FAR int *oldstate); EXTERN void pthread_testcancel(void); /* A thread can await termination of another thread and retrieve the return * value of the thread. */ -EXTERN int pthread_join(pthread_t thread, pthread_addr_t *value); +EXTERN int pthread_join(pthread_t thread, FAR pthread_addr_t *value); /* A thread may tell the scheduler that its processor can be made available. */ @@ -259,58 +259,58 @@ EXTERN void pthread_yield(void); /* Thread scheduling parameters */ -EXTERN int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param); +EXTERN int pthread_getschedparam(pthread_t thread, FAR int *policy, + FAR struct sched_param *param); EXTERN int pthread_setschedparam(pthread_t thread, int policy, - const struct sched_param *param); + FAR const struct sched_param *param); EXTERN int pthread_setschedprio(pthread_t thread, int prio); /* Thread-specific Data Interfaces */ -EXTERN int pthread_key_create(pthread_key_t *key, - FAR void (*destructor)(FAR void*)); +EXTERN int pthread_key_create(FAR pthread_key_t *key, + CODE void (*destructor)(FAR void*)); EXTERN int pthread_setspecific(pthread_key_t key, FAR void *value); EXTERN FAR void *pthread_getspecific(pthread_key_t key); EXTERN int pthread_key_delete(pthread_key_t key); /* Create, operate on, and destroy mutex attributes. */ -EXTERN int pthread_mutexattr_init(pthread_mutexattr_t *attr); -EXTERN int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); -EXTERN int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared); -EXTERN int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); +EXTERN int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared); +EXTERN int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared); /* The following routines create, delete, lock and unlock mutexes. */ -EXTERN int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr); -EXTERN int pthread_mutex_destroy(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_lock(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_trylock(pthread_mutex_t *mutex); -EXTERN int pthread_mutex_unlock(pthread_mutex_t *mutex); +EXTERN int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr); +EXTERN int pthread_mutex_destroy(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_lock(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_trylock(FAR pthread_mutex_t *mutex); +EXTERN int pthread_mutex_unlock(FAR pthread_mutex_t *mutex); /* Operations on condition variables */ -EXTERN int pthread_condattr_init(pthread_condattr_t *attr); -EXTERN int pthread_condattr_destroy(pthread_condattr_t *attr); +EXTERN int pthread_condattr_init(FAR pthread_condattr_t *attr); +EXTERN int pthread_condattr_destroy(FAR pthread_condattr_t *attr); /* A thread can create and delete condition variables. */ -EXTERN int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr); -EXTERN int pthread_cond_destroy(pthread_cond_t *cond); +EXTERN int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr); +EXTERN int pthread_cond_destroy(FAR pthread_cond_t *cond); /* A thread can signal to and broadcast on a condition variable. */ -EXTERN int pthread_cond_broadcast(pthread_cond_t *cond); -EXTERN int pthread_cond_signal(pthread_cond_t *cond); +EXTERN int pthread_cond_broadcast(FAR pthread_cond_t *cond); +EXTERN int pthread_cond_signal(FAR pthread_cond_t *cond); /* A thread can wait for a condition variable to be signalled or broadcast. */ -EXTERN int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); +EXTERN int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex); /* A thread can perform a timed wait on a condition variable. */ -EXTERN int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime); +EXTERN int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, + FAR const struct timespec *abstime); /* Barrier attributes */ diff --git a/sched/pthread_attrdestroy.c b/sched/pthread_attrdestroy.c index 14f7ca91125..bdacdab2687 100644 --- a/sched/pthread_attrdestroy.c +++ b/sched/pthread_attrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_destroy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_destroy(pthread_attr_t *attr) +int pthread_attr_destroy(FAR pthread_attr_t *attr) { int ret; diff --git a/sched/pthread_attrgetinheritsched.c b/sched/pthread_attrgetinheritsched.c index 2771b0326ce..367d9d6cf47 100644 --- a/sched/pthread_attrgetinheritsched.c +++ b/sched/pthread_attrgetinheritsched.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetinheritsched.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getinheritsched * * Description: @@ -85,10 +85,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getinheritsched(const pthread_attr_t *attr, - int *inheritsched) +int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr, + FAR int *inheritsched) { int ret; diff --git a/sched/pthread_attrgetschedparam.c b/sched/pthread_attrgetschedparam.c index 0c24ad6ceef..dd3303c4617 100644 --- a/sched/pthread_attrgetschedparam.c +++ b/sched/pthread_attrgetschedparam.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getschedparam * * Description: @@ -83,10 +83,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getschedparam(pthread_attr_t *attr, - struct sched_param *param) +int pthread_attr_getschedparam(FAR pthread_attr_t *attr, + FAR struct sched_param *param) { int ret; diff --git a/sched/pthread_attrgetschedpolicy.c b/sched/pthread_attrgetschedpolicy.c index a61a7a6a2d4..de72ef8d666 100644 --- a/sched/pthread_attrgetschedpolicy.c +++ b/sched/pthread_attrgetschedpolicy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetschedpolicy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getschedpolicy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getschedpolicy(pthread_attr_t *attr, int *policy) +int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy) { int ret; diff --git a/sched/pthread_attrgetstacksize.c b/sched/pthread_attrgetstacksize.c index d329f66e48f..c5597d2a40e 100644 --- a/sched/pthread_attrgetstacksize.c +++ b/sched/pthread_attrgetstacksize.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrgetstacksize.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_getstacksize * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_getstacksize(pthread_attr_t *attr, long *stacksize) +int pthread_attr_getstacksize(FAR pthread_attr_t *attr, FAR long *stacksize) { int ret; diff --git a/sched/pthread_attrinit.c b/sched/pthread_attrinit.c index 51f44019bb6..003cd8677ee 100644 --- a/sched/pthread_attrinit.c +++ b/sched/pthread_attrinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_init * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_init(pthread_attr_t *attr) +int pthread_attr_init(FAR pthread_attr_t *attr) { int ret = OK; diff --git a/sched/pthread_attrsetinheritsched.c b/sched/pthread_attrsetinheritsched.c index 103429fa301..c17703a5f57 100644 --- a/sched/pthread_attrsetinheritsched.c +++ b/sched/pthread_attrsetinheritsched.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetinheritsched.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setinheritsched * * Description: @@ -85,9 +85,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setinheritsched(pthread_attr_t *attr, +int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, int inheritsched) { int ret; diff --git a/sched/pthread_attrsetschedparam.c b/sched/pthread_attrsetschedparam.c index ab0bfacfd98..9cf699cbfce 100644 --- a/sched/pthread_attrsetschedparam.c +++ b/sched/pthread_attrsetschedparam.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setschedparam * * Description: @@ -83,10 +83,10 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setschedparam(pthread_attr_t *attr, - const struct sched_param *param) +int pthread_attr_setschedparam(FAR pthread_attr_t *attr, + FAR const struct sched_param *param) { int ret; diff --git a/sched/pthread_attrsetschedpolicy.c b/sched/pthread_attrsetschedpolicy.c index 89c0b7a1340..73bfb73390f 100644 --- a/sched/pthread_attrsetschedpolicy.c +++ b/sched/pthread_attrsetschedpolicy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetschedpolicy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setschedpolicy * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) +int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy) { int ret; diff --git a/sched/pthread_attrsetstacksize.c b/sched/pthread_attrsetstacksize.c index 19aeb07c4b4..7286441c774 100644 --- a/sched/pthread_attrsetstacksize.c +++ b/sched/pthread_attrsetstacksize.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * pthread_attrsetstacksize.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_attr_setstacksize * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize) +int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize) { int ret; diff --git a/sched/pthread_condattrdestroy.c b/sched/pthread_condattrdestroy.c index 5f0991ddd3a..e1d4d41fda9 100644 --- a/sched/pthread_condattrdestroy.c +++ b/sched/pthread_condattrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_condattrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,11 +43,11 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condattr_destroy * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_condattr_destroy(pthread_condattr_t *attr) +int pthread_condattr_destroy(FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/sched/pthread_condattrinit.c b/sched/pthread_condattrinit.c index c5ebe260219..4e9ca23d9f4 100644 --- a/sched/pthread_condattrinit.c +++ b/sched/pthread_condattrinit.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condattrinit.c +/**************************************************************************** + * sched/pthread_condattrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,11 +43,11 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condattr_init * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_condattr_init(pthread_condattr_t *attr) +int pthread_condattr_init(FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/sched/pthread_condbroadcast.c b/sched/pthread_condbroadcast.c index 307f2ceb1e7..4cda2af7026 100644 --- a/sched/pthread_condbroadcast.c +++ b/sched/pthread_condbroadcast.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condbroadcast.c +/**************************************************************************** + * sched/pthread_condbroadcast.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_broadcast * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_broadcast(pthread_cond_t *cond) +int pthread_cond_broadcast(FAR pthread_cond_t *cond) { int ret = OK; int sval; diff --git a/sched/pthread_conddestroy.c b/sched/pthread_conddestroy.c index 286527d6f24..e473f756413 100644 --- a/sched/pthread_conddestroy.c +++ b/sched/pthread_conddestroy.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_conddestroy.c +/**************************************************************************** + * sched/pthread_conddestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,11 +43,11 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_destroy * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_destroy(pthread_cond_t *cond) +int pthread_cond_destroy(FAR pthread_cond_t *cond) { int ret = OK; diff --git a/sched/pthread_condinit.c b/sched/pthread_condinit.c index 98c68c87d2e..6b9eebd5f0a 100644 --- a/sched/pthread_condinit.c +++ b/sched/pthread_condinit.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condinit.c +/**************************************************************************** + * sched/pthread_condinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,11 +43,11 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Global Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_init * * Description: @@ -61,9 +61,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) +int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr) { int ret = OK; diff --git a/sched/pthread_condsignal.c b/sched/pthread_condsignal.c index 9c792938f87..771d9a7694e 100644 --- a/sched/pthread_condsignal.c +++ b/sched/pthread_condsignal.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condsignal.c +/**************************************************************************** + * sched/pthread_condsignal.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_signal * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_signal(pthread_cond_t *cond) +int pthread_cond_signal(FAR pthread_cond_t *cond) { int ret = OK; int sval; diff --git a/sched/pthread_condtimedwait.c b/sched/pthread_condtimedwait.c index d4d607bd763..32a3d550be4 100644 --- a/sched/pthread_condtimedwait.c +++ b/sched/pthread_condtimedwait.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condtimedwait.c +/**************************************************************************** + * sched/pthread_condtimedwait.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -50,27 +50,27 @@ #include "pthread_internal.h" #include "clock_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_condtimedout * * Description: @@ -87,7 +87,7 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) { @@ -103,11 +103,11 @@ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) #endif } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_cond_timedwait * * Description: @@ -126,10 +126,10 @@ static void pthread_condtimedout(int argc, uint32 pid, uint32 signo, ...) * Timing is of resolution 1 msec, with +/-1 millisecond * accuracy. * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec *abstime) +int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, + FAR const struct timespec *abstime) { WDOG_ID wdog; sint32 ticks; diff --git a/sched/pthread_condwait.c b/sched/pthread_condwait.c index 799c6b85de7..56f49d4ac03 100644 --- a/sched/pthread_condwait.c +++ b/sched/pthread_condwait.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_condwait.c +/**************************************************************************** + * sched/pthread_condwait.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: int pthread_cond_wait * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) { int ret; diff --git a/sched/pthread_create.c b/sched/pthread_create.c index bd86643f9d0..f13f76b146a 100644 --- a/sched/pthread_create.c +++ b/sched/pthread_create.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_create.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -52,17 +52,17 @@ #include "env_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ /* Default pthread attributes */ @@ -74,19 +74,19 @@ FAR pthread_attr_t g_default_pthread_attr = PTHREAD_EXPLICIT_SCHED, /* inheritsched */ }; -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ /* This is the name for name-less pthreads */ static const char g_pthreadname[] = ""; -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: pthread_argsetup * * Description: @@ -111,7 +111,7 @@ static const char g_pthreadname[] = ""; * Return Value: * OK * - ************************************************************/ + ****************************************************************************/ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) { @@ -145,7 +145,7 @@ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) } } -/************************************************************ +/**************************************************************************** * Function: pthread_addjoininfo * * Description: @@ -160,7 +160,7 @@ static void pthread_argsetup(FAR _TCB *tcb, pthread_addr_t arg) * Assumptions: * The caller has provided protection from re-entrancy. * - ************************************************************/ + ****************************************************************************/ static void pthread_addjoininfo(FAR join_t *pjoin) { @@ -176,7 +176,7 @@ static void pthread_addjoininfo(FAR join_t *pjoin) g_pthread_tail = pjoin; } -/************************************************************ +/**************************************************************************** * Name: pthread_start * * Description: @@ -186,7 +186,7 @@ static void pthread_addjoininfo(FAR join_t *pjoin) * Parameters: * None * - ************************************************************/ + ****************************************************************************/ static void pthread_start(void) { @@ -219,11 +219,11 @@ static void pthread_start(void) pthread_exit(exit_status); } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: pthread_create * * Description: @@ -235,11 +235,10 @@ static void pthread_start(void) * attr * start_routine * arg - ************************************************************/ + ****************************************************************************/ -int pthread_create(pthread_t *thread, pthread_attr_t *attr, - pthread_startroutine_t start_routine, - pthread_addr_t arg) +int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr, + pthread_startroutine_t start_routine, pthread_addr_t arg) { FAR _TCB *ptcb; FAR join_t *pjoin; diff --git a/sched/pthread_getschedparam.c b/sched/pthread_getschedparam.c index 5a6ac861d22..462c6c320f3 100644 --- a/sched/pthread_getschedparam.c +++ b/sched/pthread_getschedparam.c @@ -1,7 +1,7 @@ -/**************************************************************************** +/******************************************************************************************** * pthread_getschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Included Files - ****************************************************************************/ + ********************************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/**************************************************************************** +/******************************************************************************************** * Definitions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Type Declarations - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Global Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Public Functions - *****************************************************************************/ + *********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Function: pthread_getschedparam * * Description: @@ -101,10 +101,9 @@ * * Assumptions: * - ****************************************************************************/ + ********************************************************************************************/ -int pthread_getschedparam(pthread_t thread, int *policy, - struct sched_param *param) +int pthread_getschedparam(pthread_t thread, FAR int *policy, FAR struct sched_param *param) { int ret; diff --git a/sched/pthread_join.c b/sched/pthread_join.c index 9cc8ce9e9e1..4684b4f98c5 100644 --- a/sched/pthread_join.c +++ b/sched/pthread_join.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_join.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include "os_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_join * * Description: @@ -92,9 +92,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_join(pthread_t thread, pthread_addr_t *pexit_value) +int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) { FAR join_t *pjoin; int ret; diff --git a/sched/pthread_keycreate.c b/sched/pthread_keycreate.c index 00d12716066..c11ccafe111 100644 --- a/sched/pthread_keycreate.c +++ b/sched/pthread_keycreate.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_keycreate.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_key_create * * Description: @@ -110,9 +110,9 @@ * - The present implementation ignores the destructor * argument. * - ************************************************************/ + ****************************************************************************/ -int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)) +int pthread_key_create(FAR pthread_key_t *key, CODE void (*destructor)(void*)) { #if CONFIG_NPTHREAD_KEYS > 0 int ret = EAGAIN; diff --git a/sched/pthread_mutexattrdestroy.c b/sched/pthread_mutexattrdestroy.c index 221e8b1caa0..72568e1333f 100644 --- a/sched/pthread_mutexattrdestroy.c +++ b/sched/pthread_mutexattrdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_destroy * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) +int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr) { int ret = OK; diff --git a/sched/pthread_mutexattrgetpshared.c b/sched/pthread_mutexattrgetpshared.c index 3b5a869e890..873e7ca2f2b 100644 --- a/sched/pthread_mutexattrgetpshared.c +++ b/sched/pthread_mutexattrgetpshared.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrgetpshared.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_getpshared * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared) +int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared) { int ret = OK; diff --git a/sched/pthread_mutexattrinit.c b/sched/pthread_mutexattrinit.c index 3225ad33a51..85b1e953d1e 100644 --- a/sched/pthread_mutexattrinit.c +++ b/sched/pthread_mutexattrinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_init * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_init(pthread_mutexattr_t *attr) +int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr) { int ret = OK; diff --git a/sched/pthread_mutexattrsetpshared.c b/sched/pthread_mutexattrsetpshared.c index 53a616fceb5..7574240dfec 100644 --- a/sched/pthread_mutexattrsetpshared.c +++ b/sched/pthread_mutexattrsetpshared.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexattrsetpshared.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutexattr_setpshared * * Description: @@ -82,9 +82,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) +int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared) { int ret = OK; diff --git a/sched/pthread_mutexdestroy.c b/sched/pthread_mutexdestroy.c index e894f81aee5..2b994e664d7 100644 --- a/sched/pthread_mutexdestroy.c +++ b/sched/pthread_mutexdestroy.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexdestroy.c +/**************************************************************************** + * sched/pthread_mutexdestroy.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_destroy * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_destroy(pthread_mutex_t *mutex) +int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) { int ret = OK; int status; diff --git a/sched/pthread_mutexinit.c b/sched/pthread_mutexinit.c index 928a1e32a87..5234c988f38 100644 --- a/sched/pthread_mutexinit.c +++ b/sched/pthread_mutexinit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_mutexinit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -43,31 +43,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_init * * Description: @@ -81,9 +81,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) +int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr) { int ret = OK; int pshared = 0; diff --git a/sched/pthread_mutexlock.c b/sched/pthread_mutexlock.c index ef0893f123a..d47d468f106 100644 --- a/sched/pthread_mutexlock.c +++ b/sched/pthread_mutexlock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexlock.c +/**************************************************************************** + * sched/pthread_mutexlock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_lock * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_lock(pthread_mutex_t *mutex) +int pthread_mutex_lock(FAR pthread_mutex_t *mutex) { int mypid = (int)getpid(); int ret = OK; diff --git a/sched/pthread_mutextrylock.c b/sched/pthread_mutextrylock.c index 113f64eb87e..21c76bd65c4 100644 --- a/sched/pthread_mutextrylock.c +++ b/sched/pthread_mutextrylock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutextrylock.c +/**************************************************************************** + * sched/pthread_mutextrylock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -46,31 +46,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_trylock * * Description: @@ -84,9 +84,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_trylock(pthread_mutex_t *mutex) +int pthread_mutex_trylock(FAR pthread_mutex_t *mutex) { int ret = OK; diff --git a/sched/pthread_mutexunlock.c b/sched/pthread_mutexunlock.c index d68cb68966d..1184fc804c6 100644 --- a/sched/pthread_mutexunlock.c +++ b/sched/pthread_mutexunlock.c @@ -1,7 +1,7 @@ -/************************************************************ - * pthread_mutexunlock.c +/**************************************************************************** + * sched/pthread_mutexunlock.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include #include @@ -45,31 +45,31 @@ #include #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_mutex_unlock * * Description: @@ -83,9 +83,9 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ -int pthread_mutex_unlock(pthread_mutex_t *mutex) +int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) { int ret = OK; diff --git a/sched/pthread_setcancelstate.c b/sched/pthread_setcancelstate.c index 4a23b10680f..eaa7541740a 100644 --- a/sched/pthread_setcancelstate.c +++ b/sched/pthread_setcancelstate.c @@ -1,7 +1,7 @@ -/************************************************************************** +/****************************************************************************************** * pthread_setcancelstate.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,45 +31,45 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Included Files - **************************************************************************/ + ******************************************************************************************/ #include #include #include "os_internal.h" -/************************************************************************** +/****************************************************************************************** * Private Definitions - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Types - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Function Prototypes - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Global Variables - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Variables - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Private Functions - **************************************************************************/ + ******************************************************************************************/ -/************************************************************************** +/****************************************************************************************** * Public Functions - **************************************************************************/ + ******************************************************************************************/ -int pthread_setcancelstate(int state, int *oldstate) +int pthread_setcancelstate(int state, FAR int *oldstate) { _TCB *tcb = (_TCB*)g_readytorun.head; int ret = OK; diff --git a/sched/pthread_setschedparam.c b/sched/pthread_setschedparam.c index 4f6d1bb4939..40e1c4918c8 100644 --- a/sched/pthread_setschedparam.c +++ b/sched/pthread_setschedparam.c @@ -1,7 +1,7 @@ -/**************************************************************************** +/******************************************************************************************** * pthread_setschedparam.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Included Files - ****************************************************************************/ + ********************************************************************************************/ #include #include @@ -44,31 +44,31 @@ #include #include "pthread_internal.h" -/**************************************************************************** +/******************************************************************************************** * Definitions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Type Declarations - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Global Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Variables - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Private Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Public Functions - ****************************************************************************/ + ********************************************************************************************/ -/**************************************************************************** +/******************************************************************************************** * Function: pthread_setschedparam * * Description: @@ -113,10 +113,9 @@ * * Assumptions: * - ****************************************************************************/ + ********************************************************************************************/ -int pthread_setschedparam(pthread_t thread, int policy, - const struct sched_param *param) +int pthread_setschedparam(pthread_t thread, int policy, FAR const struct sched_param *param) { int ret; diff --git a/sched/pthread_setspecific.c b/sched/pthread_setspecific.c index 4e8414dcfdf..511e9111649 100644 --- a/sched/pthread_setspecific.c +++ b/sched/pthread_setspecific.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * pthread_setspecific.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include @@ -46,31 +46,31 @@ #include "os_internal.h" #include "pthread_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: pthread_setspecific * * Description: @@ -109,7 +109,7 @@ * may be called from a thread-specific data destructor * function. * - ************************************************************/ + ****************************************************************************/ int pthread_setspecific(pthread_key_t key, FAR void *value) {