integration work:

- use SWI flags whenever possible
  - support by module unknown, escapes, strings
  - accesss thread info fom SWI
  - allow strings to be input as strings.
  - remove some unused flags.
This commit is contained in:
Vitor Santos Costa
2013-11-13 10:38:20 +00:00
parent 0d45ff8d37
commit 4fa9021a7b
33 changed files with 444 additions and 376 deletions

View File

@@ -1321,8 +1321,48 @@ Yap_source_file_name( void )
return YAP_AtomFromSWIAtom(source_file_name);
}
atom_t
accessLevel(void)
{ GET_LD
switch(LD->prolog_flag.access_level)
{ case ACCESS_LEVEL_USER: return ATOM_user;
case ACCESS_LEVEL_SYSTEM: return ATOM_system;
}
return NULL_ATOM;
}
int
getAccessLevelMask(atom_t a, access_level_t *val)
{ if ( a == ATOM_user )
*val = ACCESS_LEVEL_USER;
else if ( a == ATOM_system )
*val = ACCESS_LEVEL_SYSTEM;
else
return FALSE;
return TRUE;
}
int
currentBreakLevel(void)
{ GET_LD
return LD->break_level;
}
#if THREADS
PL_thread_info_t *
SWI_thread_info(int tid, PL_thread_info_t *info)
{
if (info)
REMOTE_PL_local_data_p(tid)->thread.info = info;
return REMOTE_PL_local_data_p(tid)->thread.info;
}
static int
recursive_attr(pthread_mutexattr_t **ap)
{ static int done;