Changeset a1eb0a5 in rtems for cpukit


Ignore:
Timestamp:
Dec 11, 2018, 2:11:10 PM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
484ef98
Parents:
b7a1f9e
git-author:
Sebastian Huber <sebastian.huber@…> (12/11/18 14:11:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/11/18 14:11:43)
Message:

posix: Fix shm_unlink()

This function is untested.

File:
1 edited

Legend:

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

    rb7a1f9e ra1eb0a5  
    2727  POSIX_Shm_Control *shm;
    2828
     29  _Objects_Allocator_lock();
     30
    2931  shm = _POSIX_Shm_Get_by_name( name, 0, &obj_err );
    3032  switch ( obj_err ) {
     
    3941    case OBJECTS_GET_BY_NAME_NO_OBJECT:
    4042    default:
    41       _Objects_Close( &_POSIX_Shm_Information, &shm->Object );
     43      _Objects_Namespace_remove_string(
     44        &_POSIX_Shm_Information,
     45        &shm->Object
     46      );
     47
    4248      if ( shm->reference_count == 0 ) {
    4349        /* Only remove the shm object if no references exist to it. Otherwise,
     
    4753      break;
    4854  }
     55
     56  _Objects_Allocator_unlock();
     57
    4958  if ( err != 0 )
    5059    rtems_set_errno_and_return_minus_one( err );
Note: See TracChangeset for help on using the changeset viewer.