forked from Imagelibrary/rtems
added an assert if a pthread_t is not the same size as an Objects_Id
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <rtems/config.h>
|
#include <rtems/config.h>
|
||||||
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/posix/cond.h>
|
#include <rtems/posix/cond.h>
|
||||||
#include <rtems/posix/config.h>
|
#include <rtems/posix/config.h>
|
||||||
#include <rtems/posix/key.h>
|
#include <rtems/posix/key.h>
|
||||||
@@ -60,12 +61,14 @@ void _POSIX_API_Initialize(
|
|||||||
{
|
{
|
||||||
posix_api_configuration_table *api_configuration;
|
posix_api_configuration_table *api_configuration;
|
||||||
|
|
||||||
|
/* XXX need to assert here based on size assumptions */
|
||||||
|
|
||||||
|
assert( sizeof(pthread_t) == sizeof(Objects_Id) );
|
||||||
|
|
||||||
api_configuration = configuration_table->POSIX_api_configuration;
|
api_configuration = configuration_table->POSIX_api_configuration;
|
||||||
if ( !api_configuration )
|
if ( !api_configuration )
|
||||||
api_configuration = &_POSIX_Default_configuration;
|
api_configuration = &_POSIX_Default_configuration;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_POSIX_Threads_Manager_initialization(
|
_POSIX_Threads_Manager_initialization(
|
||||||
api_configuration->maximum_threads,
|
api_configuration->maximum_threads,
|
||||||
api_configuration->number_of_initialization_tasks,
|
api_configuration->number_of_initialization_tasks,
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <rtems/config.h>
|
#include <rtems/config.h>
|
||||||
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/posix/cond.h>
|
#include <rtems/posix/cond.h>
|
||||||
#include <rtems/posix/config.h>
|
#include <rtems/posix/config.h>
|
||||||
#include <rtems/posix/key.h>
|
#include <rtems/posix/key.h>
|
||||||
@@ -60,12 +61,14 @@ void _POSIX_API_Initialize(
|
|||||||
{
|
{
|
||||||
posix_api_configuration_table *api_configuration;
|
posix_api_configuration_table *api_configuration;
|
||||||
|
|
||||||
|
/* XXX need to assert here based on size assumptions */
|
||||||
|
|
||||||
|
assert( sizeof(pthread_t) == sizeof(Objects_Id) );
|
||||||
|
|
||||||
api_configuration = configuration_table->POSIX_api_configuration;
|
api_configuration = configuration_table->POSIX_api_configuration;
|
||||||
if ( !api_configuration )
|
if ( !api_configuration )
|
||||||
api_configuration = &_POSIX_Default_configuration;
|
api_configuration = &_POSIX_Default_configuration;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_POSIX_Threads_Manager_initialization(
|
_POSIX_Threads_Manager_initialization(
|
||||||
api_configuration->maximum_threads,
|
api_configuration->maximum_threads,
|
||||||
api_configuration->number_of_initialization_tasks,
|
api_configuration->number_of_initialization_tasks,
|
||||||
|
|||||||
Reference in New Issue
Block a user