fix thread_create and make chr
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1915 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
		@@ -11,7 +11,7 @@ srcdir=@srcdir@
 | 
			
		||||
SHELL=@SHELL@
 | 
			
		||||
PLBASE=@PLBASE@
 | 
			
		||||
PLARCH=@PLARCH@
 | 
			
		||||
PL="../../yap"
 | 
			
		||||
PL=../../yap ../../startup
 | 
			
		||||
XPCEBASE=$(PLBASE)/xpce
 | 
			
		||||
PKGDOC=$(PLBASE)/doc/packages
 | 
			
		||||
PCEHOME=../../xpce
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,10 @@
 | 
			
		||||
 | 
			
		||||
<h2>Yap-5.1.3:</h2>
 | 
			
		||||
<ul>
 | 
			
		||||
<li> FIXED: make thread_create more compatible with SWI. (obs from
 | 
			
		||||
Paulo Moura)</li>
 | 
			
		||||
<li> FIXED: give startup path to chr. (obs from Paulo Moura)</li>
 | 
			
		||||
<li> FIXED: optimise pre-compiled meta-calls.</li>
 | 
			
		||||
<li> FIXED: CLP(BN) with BNT.</li>
 | 
			
		||||
<li> FIXED: allow dgraphs with graphs of vars.</li>
 | 
			
		||||
<li> FIXED: add matrix library documentation.</li>
 | 
			
		||||
 
 | 
			
		||||
@@ -68,7 +68,7 @@ thread_create(Goal) :-
 | 
			
		||||
	'$create_mq'(Id),	
 | 
			
		||||
	'$create_thread'(Goal, Stack, Trail, System, Detached, Id).
 | 
			
		||||
 | 
			
		||||
thread_create(Goal, Id) :-
 | 
			
		||||
thread_create(Goal, OutId) :-
 | 
			
		||||
	G0 = thread_create(Goal, Id),
 | 
			
		||||
	'$check_callable'(Goal, G0),
 | 
			
		||||
	( nonvar(Id) -> '$do_error'(type_error(variable,Id),G0) ; true ),
 | 
			
		||||
@@ -77,9 +77,10 @@ thread_create(Goal, Id) :-
 | 
			
		||||
	'$erase_thread_info'(Id),
 | 
			
		||||
	'$record_thread_info'(Id, [Stack, Trail, System], Detached),
 | 
			
		||||
	'$create_mq'(Id),	
 | 
			
		||||
	'$create_thread'(Goal, Stack, Trail, System, Detached, Id).
 | 
			
		||||
	'$create_thread'(Goal, Stack, Trail, System, Detached, Id),
 | 
			
		||||
	OutId = Id.
 | 
			
		||||
 | 
			
		||||
thread_create(Goal, Id, Options) :-
 | 
			
		||||
thread_create(Goal, OutId, Options) :-
 | 
			
		||||
	G0 = thread_create(Goal, Id, Options),
 | 
			
		||||
	'$check_callable'(Goal,G0),
 | 
			
		||||
	( nonvar(Id) -> '$do_error'(type_error(variable,Id),G0) ; true ),
 | 
			
		||||
@@ -91,7 +92,8 @@ thread_create(Goal, Id, Options) :-
 | 
			
		||||
	;	'$record_thread_info'(Id, Alias, [Stack, Trail, System], Detached, G0)
 | 
			
		||||
	),
 | 
			
		||||
	'$create_mq'(Id),	
 | 
			
		||||
	'$create_thread'(Goal, Stack, Trail, System, Detached, Id).
 | 
			
		||||
	'$create_thread'(Goal, Stack, Trail, System, Detached, Id),
 | 
			
		||||
	OutId = Id.
 | 
			
		||||
 | 
			
		||||
'$erase_thread_info'(Id) :-
 | 
			
		||||
	recorded('$thread_exit_status', [Id|_], R),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user