1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Revert "Backport atomic job locking from ksh 93v- beta" (52067c3d)

That patch broke the build on Cygwin, where gcc apparently doesn't
have the required atomic addition/subtraction compiler builtins.
The build fails at link time with those functions not found.

As far as I know, ksh was actually working fine (after @JohnoKing's
gcc workaround in c258a04f), so I'll just revert this for now. If a
need for it is demonstrated later, we'll have to add a feature test
or find some other way to get it working on Cygwin.
This commit is contained in:
Martijn Dekker 2021-03-17 14:25:34 +00:00
parent 82c6922330
commit 595a0a5684
2 changed files with 15 additions and 7 deletions

View file

@ -1891,8 +1891,14 @@ again:
void *job_subsave(void)
{
struct back_save *bp = new_of(struct back_save,0);
/*
* We must make a lock first before doing anything else,
* otherwise GCC will remove the job locking mechanism
* as a result of compiler optimization.
*/
job_lock();
struct back_save *bp = new_of(struct back_save,0);
*bp = bck;
bp->prev = bck.prev;
bck.count = 0;