summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-04 09:30:21 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:44 +0200
commit4a3c920d307f9da19a4215f2496e8ddd9bddce15 (patch)
tree86c22d15cb50d0373778c8e503179ae06fc24907
parentlibcsupport: Avoid Giant lock in rtems_verror() (diff)
downloadrtems-4a3c920d307f9da19a4215f2496e8ddd9bddce15.tar.bz2
libcsupport: Fix umask() locking
Delete comment related to an obsolete implementation of rtems_libio_set_private_env().
-rw-r--r--cpukit/libcsupport/src/umask.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/umask.c b/cpukit/libcsupport/src/umask.c
index 678cac8c50..fba2405e4a 100644
--- a/cpukit/libcsupport/src/umask.c
+++ b/cpukit/libcsupport/src/umask.c
@@ -21,7 +21,6 @@
#include <sys/stat.h>
#include <rtems/libio_.h>
-#include <rtems/score/threaddispatch.h>
/**
* POSIX 1003.1b 5.3.3 - Set File Creation Mask
@@ -30,14 +29,10 @@ mode_t umask( mode_t cmask )
{
mode_t old_mask;
- /*
- * We must use the same protection mechanism as in
- * rtems_libio_set_private_env().
- */
- _Thread_Disable_dispatch();
+ rtems_libio_lock();
old_mask = rtems_filesystem_umask;
rtems_filesystem_umask = cmask & (S_IRWXU | S_IRWXG | S_IRWXO);
- _Thread_Enable_dispatch();
+ rtems_libio_unlock();
return old_mask;
}