fix some thread bugs (thanks to Paulo Moura).
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1866 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
67738fbbd1
commit
7fe05a5c48
1
C/init.c
1
C/init.c
@ -973,7 +973,6 @@ InitCodes(void)
|
||||
INIT_LOCK(Yap_heap_regs->dead_mega_clauses_lock);
|
||||
INIT_LOCK(Yap_heap_regs->dead_static_indices_lock);
|
||||
INIT_LOCK(Yap_heap_regs->op_list_lock);
|
||||
INIT_LOCK(Yap_heap_regs->modules_lock);
|
||||
Yap_heap_regs->heap_top_owner = -1;
|
||||
{
|
||||
int i;
|
||||
|
@ -3356,7 +3356,7 @@ p_has_bom (void)
|
||||
|
||||
static Int
|
||||
p_representation_error (void)
|
||||
{ /* '$set_output'(+Stream,-ErrorMessage) */
|
||||
{ /* '$representation_error'(+Stream,-ErrorMessage) */
|
||||
Int sno = CheckStream (ARG1, Input_Stream_f|Output_Stream_f, "representation_errors/1");
|
||||
if (sno < 0)
|
||||
return (FALSE);
|
||||
@ -3384,6 +3384,7 @@ p_representation_error (void)
|
||||
Stream[sno].status &= ~(RepError_Prolog_f|RepError_Xml_f);
|
||||
}
|
||||
}
|
||||
UNLOCK(Stream[sno].streamlock);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ GetModuleEntry(Atom at)
|
||||
p0 = me->NextOfPE;
|
||||
}
|
||||
new = (ModEntry *) Yap_AllocAtomSpace(sizeof(*new));
|
||||
INIT_RWLOCK(new->GRWLock);
|
||||
INIT_RWLOCK(new->ModRWLock);
|
||||
new->KindOfPE = ModProperty;
|
||||
new->NextME = CurrentModules;
|
||||
CurrentModules = new;
|
||||
|
@ -348,6 +348,9 @@ typedef struct mod_entry
|
||||
PropFlags KindOfPE; /* kind of property */
|
||||
struct pred_entry *PredForME; /* index in module table */
|
||||
Atom AtomOfME; /* module's name */
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
rwlock_t ModRWLock; /* a read-write lock to protect the entry */
|
||||
#endif
|
||||
struct mod_entry *NextME; /* next module */
|
||||
} ModEntry;
|
||||
|
||||
|
@ -3024,8 +3024,9 @@ Integers are sorted in increasing order;
|
||||
@item
|
||||
atoms are sorted in lexicographic order;
|
||||
@item
|
||||
compound terms are ordered first by name, then by arity of the main
|
||||
functor, and finally by their arguments in left-to-right order.
|
||||
compound terms are ordered first by arity of the main functor, then by
|
||||
the name of the main functor, and finally by their arguments in
|
||||
left-to-right order.
|
||||
@end itemize
|
||||
|
||||
@table @code
|
||||
|
Reference in New Issue
Block a user