Changeset 03acc59 in rtems for cpukit/sapi


Ignore:
Timestamp:
Aug 14, 2013, 12:21:41 AM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
b7f2060
Parents:
40398c4
Message:

posix: Change pthread_once to be SMP safe.

Change pthread_once from using disabled pre-emption to using a
pthread mutex making it SMP safe. GCC using a posix threading
model uses pthread_once.

The pthread mutex requires at least 1 mutex is configured so
confdefs.h has been updated to account for the internal
mutex.

Location:
cpukit/sapi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r40398c4 r03acc59  
    16961696
    16971697  /**
     1698   * POSIX Once support uses a single mutex.
     1699   */
     1700  #define CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES 1
     1701
     1702  /**
    16981703   * Account for the object control structures plus the name
    16991704   * of the object to be duplicated.
     
    18571862  #define CONFIGURE_MEMORY_FOR_POSIX \
    18581863    ( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES + \
     1864          CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES + \
    18591865          CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES) + \
    18601866      CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
     
    23052311        CONFIGURE_MAXIMUM_GOROUTINES,
    23062312      CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES +
     2313        CONFIGURE_MAXIMUM_POSIX_INTERNAL_MUTEXES +
    23072314        CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS +
    23082315        CONFIGURE_GO_INIT_MUTEXES + CONFIGURE_MAXIMUM_GO_CHANNELS,
  • cpukit/sapi/src/posixapi.c

    r40398c4 r03acc59  
    3434#include <rtems/posix/mqueueimpl.h>
    3535#include <rtems/posix/muteximpl.h>
     36#include <rtems/posix/onceimpl.h>
    3637#include <rtems/posix/posixapi.h>
    3738#include <rtems/posix/priorityimpl.h>
     
    6768  _POSIX_Mutex_Manager_initialization();
    6869  _POSIX_Message_queue_Manager_initialization();
     70  _POSIX_Once_Manager_initialization();
    6971  _POSIX_Semaphore_Manager_initialization();
    7072  _POSIX_Timer_Manager_initialization();
Note: See TracChangeset for help on using the changeset viewer.