Changeset b2700c35 in rtems


Ignore:
Timestamp:
Apr 7, 2014, 1:55:55 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
fef4293
Parents:
316ba97
git-author:
Sebastian Huber <sebastian.huber@…> (04/07/14 13:55:55)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/07/14 14:48:02)
Message:

score: Use proper protection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/workspacegreedy.c

    r316ba97 rb2700c35  
    2525
    2626#include <rtems/rtems/support.h>
     27#include <rtems/score/apimutex.h>
    2728#include <rtems/score/heapimpl.h>
    2829#include <rtems/score/threaddispatch.h>
     
    3637  void *opaque;
    3738
    38   _Thread_Disable_dispatch();
     39  _RTEMS_Lock_allocator();
    3940  opaque = _Heap_Greedy_allocate( &_Workspace_Area, block_sizes, block_count );
    40   _Thread_Enable_dispatch();
     41  _RTEMS_Unlock_allocator();
    4142
    4243  return opaque;
     
    4950  void *opaque;
    5051
    51   _Thread_Disable_dispatch();
     52  _RTEMS_Lock_allocator();
    5253  opaque = _Heap_Greedy_allocate_all_except_largest(
    5354    &_Workspace_Area,
    5455    allocatable_size
    5556  );
    56   _Thread_Enable_dispatch();
     57  _RTEMS_Unlock_allocator();
    5758
    5859  return opaque;
     
    6162void rtems_workspace_greedy_free( void *opaque )
    6263{
    63   _Thread_Disable_dispatch();
     64  _RTEMS_Lock_allocator();
    6465  _Heap_Greedy_free( &_Workspace_Area, opaque );
    65   _Thread_Enable_dispatch();
     66  _RTEMS_Unlock_allocator();
    6667}
Note: See TracChangeset for help on using the changeset viewer.