Changeset 48b04fc3 in rtems for cpukit/posix/src/mutexget.c


Ignore:
Timestamp:
Apr 19, 2016, 4:28:03 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
adbedd1
Parents:
bbe654af
git-author:
Sebastian Huber <sebastian.huber@…> (04/19/16 04:28:03)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/16 05:29:39)
Message:

posix: Avoid Giant lock for mutexes

Delete _POSIX_Mutex_Get(). Use _POSIX_Mutex_Get_interrupt_disable()
instead.

Update #2555.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/mutexget.c

    rbbe654af r48b04fc3  
    2222#include <rtems/score/apimutex.h>
    2323
    24 static bool _POSIX_Mutex_Check_id_and_auto_init(
    25   pthread_mutex_t   *mutex,
    26   Objects_Locations *location
    27 )
     24static bool _POSIX_Mutex_Check_id_and_auto_init( pthread_mutex_t *mutex )
    2825{
    2926  if ( mutex == NULL ) {
    30     *location = OBJECTS_ERROR;
    31 
    3227    return false;
    3328  }
     
    4742
    4843    if ( eno != 0 ) {
    49       *location = OBJECTS_ERROR;
    50 
    5144      return false;
    5245    }
     
    5447
    5548  return true;
    56 }
    57 
    58 POSIX_Mutex_Control *_POSIX_Mutex_Get (
    59   pthread_mutex_t   *mutex,
    60   Objects_Locations *location
    61 )
    62 {
    63   if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex, location ) ) {
    64     return NULL;
    65   }
    66 
    67   return (POSIX_Mutex_Control *)
    68     _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
    6949}
    7050
     
    7656  Objects_Locations location;
    7757
    78   if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex, &location ) ) {
     58  if ( !_POSIX_Mutex_Check_id_and_auto_init( mutex ) ) {
    7959    return NULL;
    8060  }
Note: See TracChangeset for help on using the changeset viewer.