forked from Imagelibrary/rtems
added correct use of _Thread_queue_Enter_critical_section
This commit is contained in:
@@ -350,6 +350,7 @@ int _POSIX_Condition_variables_Wait_support(
|
||||
|
||||
the_cond->Mutex = *mutex;
|
||||
|
||||
/* XXX .. enter critical section .. */
|
||||
_Thread_queue_Enqueue( &the_cond->Wait_queue, 0 );
|
||||
|
||||
_Thread_Enable_dispatch();
|
||||
|
||||
@@ -355,7 +355,7 @@ rtems_status_code rtems_region_get_segment(
|
||||
executing->Wait.count = size;
|
||||
executing->Wait.return_argument = (unsigned32 *) segment;
|
||||
|
||||
the_region->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
|
||||
|
||||
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ void _CORE_message_queue_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_message_queue->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
|
||||
executing->Wait.queue = &the_message_queue->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
executing->Wait.return_argument = (void *)buffer;
|
||||
|
||||
@@ -139,7 +139,7 @@ void _CORE_mutex_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_mutex->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_mutex->Wait_queue );
|
||||
executing->Wait.queue = &the_mutex->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
_ISR_Enable( level );
|
||||
|
||||
@@ -146,7 +146,7 @@ void _CORE_semaphore_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_semaphore->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
|
||||
executing->Wait.queue = &the_semaphore->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
_ISR_Enable( level );
|
||||
|
||||
@@ -195,7 +195,7 @@ unsigned32 _MPCI_Send_request_packet (
|
||||
|
||||
(*_MPCI_table->send_packet)( destination, the_packet );
|
||||
|
||||
_MPCI_Remote_blocked_threads.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &_MPCI_Remote_blocked_threads );
|
||||
|
||||
/*
|
||||
* See if we need a default timeout
|
||||
|
||||
@@ -350,6 +350,7 @@ int _POSIX_Condition_variables_Wait_support(
|
||||
|
||||
the_cond->Mutex = *mutex;
|
||||
|
||||
/* XXX .. enter critical section .. */
|
||||
_Thread_queue_Enqueue( &the_cond->Wait_queue, 0 );
|
||||
|
||||
_Thread_Enable_dispatch();
|
||||
|
||||
@@ -355,7 +355,7 @@ rtems_status_code rtems_region_get_segment(
|
||||
executing->Wait.count = size;
|
||||
executing->Wait.return_argument = (unsigned32 *) segment;
|
||||
|
||||
the_region->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
|
||||
|
||||
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ void _CORE_message_queue_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_message_queue->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
|
||||
executing->Wait.queue = &the_message_queue->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
executing->Wait.return_argument = (void *)buffer;
|
||||
|
||||
@@ -139,7 +139,7 @@ void _CORE_mutex_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_mutex->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_mutex->Wait_queue );
|
||||
executing->Wait.queue = &the_mutex->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
_ISR_Enable( level );
|
||||
|
||||
@@ -146,7 +146,7 @@ void _CORE_semaphore_Seize(
|
||||
return;
|
||||
}
|
||||
|
||||
the_semaphore->Wait_queue.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
|
||||
executing->Wait.queue = &the_semaphore->Wait_queue;
|
||||
executing->Wait.id = id;
|
||||
_ISR_Enable( level );
|
||||
|
||||
@@ -195,7 +195,7 @@ unsigned32 _MPCI_Send_request_packet (
|
||||
|
||||
(*_MPCI_table->send_packet)( destination, the_packet );
|
||||
|
||||
_MPCI_Remote_blocked_threads.sync = TRUE;
|
||||
_Thread_queue_Enter_critical_section( &_MPCI_Remote_blocked_threads );
|
||||
|
||||
/*
|
||||
* See if we need a default timeout
|
||||
|
||||
Reference in New Issue
Block a user