From 9e3438bee63e8550ec432a70063a721fcf6f60e2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 Mar 2000 20:20:44 +0000 Subject: * sysdeps/mach/hurd/setrlimit.c (setrlimit): Go into a critical section while taking the _hurd_rlimit_lock. * sysdeps/mach/hurd/getrlimit.c (__getrlimit): Likewise. --- sysdeps/mach/hurd/setrlimit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sysdeps/mach/hurd/setrlimit.c') diff --git a/sysdeps/mach/hurd/setrlimit.c b/sysdeps/mach/hurd/setrlimit.c index d2988d5147..1ae2254080 100644 --- a/sysdeps/mach/hurd/setrlimit.c +++ b/sysdeps/mach/hurd/setrlimit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 94, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,97,98,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -51,9 +51,11 @@ setrlimit (resource, rlimits) if (lim.rlim_cur > lim.rlim_max) lim.rlim_cur = lim.rlim_max; + HURD_CRITICAL_BEGIN; __mutex_lock (&_hurd_rlimit_lock); _hurd_rlimits[resource] = lim; __mutex_unlock (&_hurd_rlimit_lock); + HURD_CRITICAL_END; return 0; } -- cgit 1.4.1