mirror of
				git://git.code.sf.net/p/cdesktopenv/code
				synced 2025-03-09 15:50:02 +00:00 
			
		
		
		
	Backport atomic job locking from ksh 93v- beta
Something similar was previously done in07cc71b8from a Debian patch, and eventually reverted; it redefined the ast atomic functions asoincint() and asodecint() to be gcc-specific. This imports the upstream version from the ksh 93v- beta instead. This commit is based on an OpenSUSE patch: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-joblock.dif src/cmd/ksh93/include/jobs.h: - Replace job locking mechanism with the 93v- version which uses the atomic libast functions asoincint(), asogetint() and asodecint(). See: src/lib/libast/man/aso.3 src/cmd/ksh93/sh/jobs.c: job_subsave(): - Revert gcc optimiser bug workaround fromc258a04f. It should now be unnecessary.
This commit is contained in:
		
							parent
							
								
									1bd0620708
								
							
						
					
					
						commit
						52067c3d37
					
				
					 2 changed files with 7 additions and 15 deletions
				
			
		|  | @ -1882,14 +1882,8 @@ again: | |||
| 
 | ||||
| void *job_subsave(void) | ||||
| { | ||||
| 	/*
 | ||||
| 	 * 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); | ||||
| 	job_lock(); | ||||
| 	*bp = bck; | ||||
| 	bp->prev = bck.prev; | ||||
| 	bck.count = 0; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue