Changeset ef1a985 in rtems


Ignore:
Timestamp:
Dec 11, 2015, 9:47:22 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
cef5675
Parents:
04436ae
git-author:
Sebastian Huber <sebastian.huber@…> (12/11/15 09:47:22)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:54)
Message:

Optional POSIX Threads initialization

Update #2408.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/include/rtems/posix/pthreadimpl.h

    r04436ae ref1a985  
    4545 * this class of objects.
    4646 */
    47 POSIX_EXTERN Thread_Information _POSIX_Threads_Information;
     47extern Thread_Information _POSIX_Threads_Information;
    4848
    4949/**
     
    6060 */
    6161extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
    62 
    63 /**
    64  * @brief POSIX threads manager initialization.
    65  *
    66  * This routine performs the initialization necessary for this manager.
    67  */
    68 void _POSIX_Threads_Manager_initialization(void);
    6962
    7063/**
  • cpukit/posix/src/killinfo.c

    r04436ae ref1a985  
    199199
    200200    the_info = _Objects_Information_table[ the_api ][ 1 ];
    201 
    202     #if defined(RTEMS_DEBUG)
    203       /*
    204        *  This cannot happen in the current (as of June 2009) implementation
    205        *  of initialization but at some point, the object information
    206        *  structure for a particular manager may not be installed.
    207        */
    208       if ( !the_info )
    209         continue;
    210     #endif
     201    if ( !the_info )
     202      continue;
    211203
    212204    maximum = the_info->maximum;
  • cpukit/posix/src/pthread.c

    r04436ae ref1a985  
    2727#include <rtems/system.h>
    2828#include <rtems/config.h>
     29#include <rtems/sysinit.h>
    2930#include <rtems/score/apiext.h>
    3031#include <rtems/score/stack.h>
     
    4344#include <rtems/score/cpusetimpl.h>
    4445#include <rtems/score/assert.h>
     46
     47Thread_Information _POSIX_Threads_Information;
    4548
    4649/*
     
    339342 *  This routine initializes all threads manager related data structures.
    340343 */
    341 void _POSIX_Threads_Manager_initialization(void)
     344static void _POSIX_Threads_Manager_initialization(void)
    342345{
    343346  #if defined(RTEMS_SMP) && defined(__RTEMS_HAVE_SYS_CPUSET_H__)
     
    382385   */
    383386}
     387
     388RTEMS_SYSINIT_ITEM(
     389  _POSIX_Threads_Manager_initialization,
     390  RTEMS_SYSINIT_POSIX_THREADS,
     391  RTEMS_SYSINIT_ORDER_MIDDLE
     392);
  • cpukit/sapi/src/posixapi.c

    r04436ae ref1a985  
    3939#include <rtems/posix/priorityimpl.h>
    4040#include <rtems/posix/psignalimpl.h>
    41 #include <rtems/posix/pthreadimpl.h>
    4241#include <rtems/posix/rwlockimpl.h>
    4342#include <rtems/posix/timerimpl.h>
     
    6564
    6665  #ifdef RTEMS_POSIX_API
    67     _POSIX_Threads_Manager_initialization();
    6866    _POSIX_Condition_variables_Manager_initialization();
    6967    _POSIX_Mutex_Manager_initialization();
  • cpukit/score/include/rtems/sysinit.h

    r04436ae ref1a985  
    4444#define RTEMS_SYSINIT_CLASSIC_BARRIER            00034a
    4545#define RTEMS_SYSINIT_POSIX_SIGNALS              000360
     46#define RTEMS_SYSINIT_POSIX_THREADS              000361
    4647#define RTEMS_SYSINIT_IDLE_THREADS               000380
    4748#define RTEMS_SYSINIT_BSP_LIBC                   000400
  • testsuites/sptests/spsysinit01/init.c

    r04436ae ref1a985  
    2929#ifdef RTEMS_POSIX_API
    3030#include <rtems/posix/psignalimpl.h>
     31#include <rtems/posix/pthreadimpl.h>
    3132#endif /* RTEMS_POSIX_API */
    3233#include <rtems/rtems/barrierimpl.h>
     
    8283  POSIX_SIGNALS_PRE,
    8384  POSIX_SIGNALS_POST,
     85  POSIX_THREADS_PRE,
     86  POSIX_THREADS_POST,
    8487#endif /* RTEMS_POSIX_API */
    8588  IDLE_THREADS_PRE,
     
    344347}
    345348
     349FIRST(RTEMS_SYSINIT_POSIX_THREADS)
     350{
     351  assert(_POSIX_Threads_Information.Objects.maximum == 0);
     352  next_step(POSIX_THREADS_PRE);
     353}
     354
     355LAST(RTEMS_SYSINIT_POSIX_THREADS)
     356{
     357  assert(_POSIX_Threads_Information.Objects.maximum != 0);
     358  next_step(POSIX_THREADS_POST);
     359}
     360
    346361#endif /* RTEMS_POSIX_API */
    347362
     
    449464#define CONFIGURE_MAXIMUM_TIMERS 1
    450465
     466#ifdef RTEMS_POSIX_API
     467
     468#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
     469
     470#endif /* RTEMS_POSIX_API */
     471
    451472#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    452473
Note: See TracChangeset for help on using the changeset viewer.