diff options
author | Eric Norum <WENorum@lbl.gov> | 2008-05-13 20:45:51 +0000 |
---|---|---|
committer | Eric Norum <WENorum@lbl.gov> | 2008-05-13 20:45:51 +0000 |
commit | d871cf1bc6a977a88c7d897d3beafd99a2e97f75 (patch) | |
tree | f75383fbfc98fd5d89cc4fb89593757ebae841a1 | |
parent | 2008-05-13 Robert S. Grimes <rsg@alum.mit.edu> (diff) | |
download | rtems-d871cf1bc6a977a88c7d897d3beafd99a2e97f75.tar.bz2 |
Add locks around non-atomic structure assignment.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libcsupport/src/malloc_get_statistics.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 74df3a9eca..236170c7a0 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2008-05-13 Eric Norum: <norume@aps.anl.gov> + + * cpukit/libcsupport/src/mallocinfo.c: Add locks around non-atomic + structure assignment. + 2008-05-13 Robert S. Grimes <rsg@alum.mit.edu> * libi2c/libi2c.h: Fix typo. diff --git a/cpukit/libcsupport/src/malloc_get_statistics.c b/cpukit/libcsupport/src/malloc_get_statistics.c index 57cc8c600f..b0531d6244 100644 --- a/cpukit/libcsupport/src/malloc_get_statistics.c +++ b/cpukit/libcsupport/src/malloc_get_statistics.c @@ -24,7 +24,9 @@ int malloc_get_statistics( { if ( !stats ) return -1; + _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; + _RTEMS_Unlock_allocator(); return 0; } |