diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-05-21 18:08:32 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-05-21 18:08:32 -0500 |
commit | 24acc6d0c092c244881dd6ffadc3782a8136fccc (patch) | |
tree | 864b4985a7a431bd3520e9d815927eee5315c2df /cpukit/libcsupport/src/umask.c | |
parent | Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems (diff) | |
parent | doc: Add new documentation section for Epiphany architecture (diff) | |
download | rtems-24acc6d0c092c244881dd6ffadc3782a8136fccc.tar.bz2 |
Merge branch 'master' of ssh://dispatch.rtems.org/data/git/rtems
Diffstat (limited to 'cpukit/libcsupport/src/umask.c')
-rw-r--r-- | cpukit/libcsupport/src/umask.c | 9 |
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; } |