From mboxrd@z Thu Jan 1 00:00:00 1970 From: eric.norum@usask.ca To: gcc-gnats@gcc.gnu.org Subject: libstdc++/4367: Sparc atomicity.h routines can lock up on some OS. Date: Thu, 20 Sep 2001 07:56:00 -0000 Message-id: <20010920145001.19560.qmail@sourceware.cygnus.com> X-SW-Source: 2001-09/msg00417.html List-Id: >Number: 4367 >Category: libstdc++ >Synopsis: Sparc atomicity.h routines can lock up on some OS. >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Sep 20 07:56:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Eric Norum >Release: gcc-3.0 >Organization: >Environment: Real-time OS environments (e.g. vxWorks, pSOS+, eCOS, RTEMS) >Description: The sparc version of the routines in atomicity.h can lock up on operating systems which provide strict priority-based scheduling (e.g. vxWorks, pSOS+, eCOS, RTEMS). Here's the scenario: 1) Low priority task enters __exchange_and_add and sets the lock. 2) While low-priority task is still active in __exchange_and_add a higher-priority task preempts. 3) The higher-priority task enters __exchange_and_add and enters an infinite loop trying to set the lock. >How-To-Repeat: >Fix: None that I can think of, unfortunately! >Release-Note: >Audit-Trail: >Unformatted: