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:
parent
82c6922330
commit
595a0a5684
2 changed files with 15 additions and 7 deletions
|
|
@ -33,7 +33,6 @@
|
|||
# include <signal.h>
|
||||
#endif /* !SIGINT */
|
||||
#include "FEATURE/options"
|
||||
#include <aso.h>
|
||||
|
||||
#undef JOBS
|
||||
#if defined(SIGCLD) && !defined(SIGCHLD)
|
||||
|
|
@ -126,13 +125,16 @@ extern struct jobs job;
|
|||
#define vmbusy() 0
|
||||
#endif
|
||||
|
||||
#define job_lock() asoincint(&job.in_critical)
|
||||
#define job_lock() (job.in_critical++)
|
||||
#define job_unlock() \
|
||||
do { \
|
||||
int _sig; \
|
||||
if (asogetint(&job.in_critical) == 1 && (_sig = job.savesig) && !vmbusy()) \
|
||||
job_reap(_sig); \
|
||||
asodecint(&job.in_critical); \
|
||||
int sig; \
|
||||
if (!--job.in_critical && (sig = job.savesig)) \
|
||||
{ \
|
||||
if (!job.in_critical++ && !vmbusy()) \
|
||||
job_reap(sig); \
|
||||
job.in_critical--; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
extern const char e_jobusage[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue