From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 470F8385414D; Mon, 11 Jul 2022 11:54:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 470F8385414D Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] tsleep: Add a PNOLOCK flag X-Act-Checkin: newlib-cygwin X-Git-Author: Andrew Gallatin X-Git-Refname: refs/heads/master X-Git-Oldrev: 356891f5e0ddd6414383f408ab289f3687972048 X-Git-Newrev: 4bf5c259d3be0216a4b0e322fa5a60bb46ea7279 Message-Id: <20220711115455.470F8385414D@sourceware.org> Date: Mon, 11 Jul 2022 11:54:55 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:54:55 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D4bf5c259d3b= e0216a4b0e322fa5a60bb46ea7279 commit 4bf5c259d3be0216a4b0e322fa5a60bb46ea7279 Author: Andrew Gallatin Date: Thu Aug 5 17:16:30 2021 -0400 tsleep: Add a PNOLOCK flag =20 Add a PNOLOCK flag so that, in the race circumstance where wakeup races are externally mitigated, tsleep() can be called with a sleep time of 0 without triggering an an assertion. =20 Reviewed by: jhb Sponsored by: Netflix Diff: --- newlib/libc/sys/rtems/include/sys/param.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/param.h b/newlib/libc/sys/rt= ems/include/sys/param.h index 2e44057dd..c346453bf 100644 --- a/newlib/libc/sys/rtems/include/sys/param.h +++ b/newlib/libc/sys/rtems/include/sys/param.h @@ -153,9 +153,11 @@ ((off_t)(db) << DEV_BSHIFT) #endif =20 -#define PRIMASK 0x0ff -#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ -#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ +#define PRIMASK 0x0ff +#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ +#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex = */ +#define PNOLOCK 0x400 /* OR'd with pri to allow sleeping w/o a lock */ +#define PRILASTFLAG 0x400 /* Last flag defined above */ =20 #define NZERO 0 /* default "nice" */