From 264a3c6b5434cb52d572930c1ae01c46373ab465 Mon Sep 17 00:00:00 2001 From: pmoura Date: Mon, 29 Jan 2007 19:08:14 +0000 Subject: [PATCH] Added read-only flag "max_threads". git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1793 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/directives.yap | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pl/directives.yap b/pl/directives.yap index a510b9c22..3c073176a 100644 --- a/pl/directives.yap +++ b/pl/directives.yap @@ -644,6 +644,15 @@ yap_flag(float_format,X) :- yap_flag(float_format,X) :- '$do_error'(type_error(atom,X),yap_flag(float_format,X)). +yap_flag(max_threads,X) :- + var(X), !, + '$max_threads'(X). +yap_flag(max_threads,X) :- + integer(X), X > 0, !, + '$do_error'(permission_error(modify,flag,max_threads),yap_flag(max_threads,X)). +yap_flag(max_threads,X) :- + '$do_error'(domain_error(flag_value,max_threads+X),yap_flag(max_threads,X)). + '$show_yap_flag_opts'(V,Out) :- ( V = answer_format ; @@ -696,7 +705,8 @@ yap_flag(float_format,X) :- V = user_output ; V = verbose_auto_load ; V = version ; - V = write_strings + V = write_strings; + V = max_threads ), yap_flag(V, Out).