diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-14 18:31:43 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-14 18:31:43 +0000 |
commit | a6608123c0952979821bbfe4bf58713403c2f9cb (patch) | |
tree | 6f3206c34b4f75b3bc5146d9527f165cbc3c9205 /cpukit/posix/src | |
parent | 2008-12-12 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-a6608123c0952979821bbfe4bf58713403c2f9cb.tar.bz2 |
2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/src/chg_pri.c, itron/src/cre_tsk.c, itron/src/rot_rdq.c,
posix/Makefile.am, posix/include/rtems/posix/mutex.h,
posix/include/rtems/posix/priority.h, posix/src/mutex.c,
score/include/rtems/score/priority.h: Run all tests successfully with
maxixum number of priorities as 16 instead of 256. This was done by
temporarily modifying the score priority.h maximum. This allowed
testing of all API code to ensure that it worked properly with a
reduced number of priorities. Most modifications were to switch from
hard-coded maximum to using the SuperCore variable based upon
configured number.
* posix/src/mutexdefaultattributes.c: Removed.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/mutex.c | 15 | ||||
-rw-r--r-- | cpukit/posix/src/mutexdefaultattributes.c | 37 |
2 files changed, 15 insertions, 37 deletions
diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c index c42ad88780..9ba8356223 100644 --- a/cpukit/posix/src/mutex.c +++ b/cpukit/posix/src/mutex.c @@ -43,6 +43,21 @@ void _POSIX_Mutex_Manager_initialization( uint32_t maximum_mutexes ) { + pthread_mutexattr_t *default_attr = &_POSIX_Mutex_Default_attributes; + + /* + * Since the maximum priority is run-time configured, this + * structure cannot be initialized statically. + */ + default_attr->is_initialized = TRUE; + default_attr->process_shared = PTHREAD_PROCESS_PRIVATE; + default_attr->prio_ceiling = POSIX_SCHEDULER_MAXIMUM_PRIORITY; + default_attr->protocol = PTHREAD_PRIO_NONE; + default_attr->recursive = FALSE; + + /* + * Initialize the POSIX mutex object class information structure. + */ _Objects_Initialize_information( &_POSIX_Mutex_Information, /* object information table */ OBJECTS_POSIX_API, /* object API */ diff --git a/cpukit/posix/src/mutexdefaultattributes.c b/cpukit/posix/src/mutexdefaultattributes.c deleted file mode 100644 index 3e3c00c3e8..0000000000 --- a/cpukit/posix/src/mutexdefaultattributes.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * COPYRIGHT (c) 1989-2007. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <errno.h> -#include <pthread.h> - -#include <rtems/system.h> -#include <rtems/score/coremutex.h> -#include <rtems/score/watchdog.h> -#include <rtems/posix/mutex.h> -#include <rtems/posix/priority.h> -#include <rtems/posix/time.h> - -/*PAGE - * - * The default mutex attributes structure. - */ - -const pthread_mutexattr_t _POSIX_Mutex_Default_attributes = { - TRUE, /* is_initialized */ - PTHREAD_PROCESS_PRIVATE, /* process_shared */ - POSIX_SCHEDULER_MAXIMUM_PRIORITY, /* prio_ceiling */ - PTHREAD_PRIO_NONE, /* protocol */ - FALSE /* recursive */ -}; |