Skip to content

Commit

Permalink
Remove some guard errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbehrends committed Sep 20, 2018
1 parent 2869ca9 commit 22eade5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/coll.gd
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ BIND_GLOBAL( "InstallSubsetMaintenance",
# (We must not call `SUBTR_SET' here because the lists types may be
# not yet defined.)
filtssub:= [];
atomic readwrite SUBSET_MAINTAINED_INFO do
atomic readwrite SUBSET_MAINTAINED_INFO, readonly FILTER_REGION do
for flag in TRUES_FLAGS( FLAGS_FILTER( sub_req ) ) do
if not INFO_FILTERS[flag] in FNUM_CATS_AND_REPS then
ADD_LIST_DEFAULT( filtssub, flag );
Expand Down
6 changes: 4 additions & 2 deletions lib/filter.g
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,10 @@ BIND_GLOBAL( "RankFilter", function( filter )
else
all := WITH_IMPS_FLAGS(flags);
fi;
for i in TRUES_FLAGS(all) do
rank := rank + RANK_FILTERS[i];
atomic readonly FILTER_REGION do
for i in TRUES_FLAGS(all) do
rank := rank + RANK_FILTERS[i];
od;
od;
return rank;
end );
Expand Down
4 changes: 2 additions & 2 deletions lib/oper.g
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ BIND_GLOBAL( "INSTALL_IMMEDIATE_METHOD",
Error( "no immediate methods for mutable objects!" );
fi;
relev := [];
atomic FILTER_REGION do

for i in flags do
if not INFO_FILTERS[i] in FNUM_CATS_AND_REPS then
ADD_LIST( relev, i );
Expand All @@ -305,8 +307,6 @@ BIND_GLOBAL( "INSTALL_IMMEDIATE_METHOD",
fi;
flags:= relev;

atomic FILTER_REGION do

# Remove requirements that are implied by the remaining ones.
# (Note that it is possible to have implications from a filter
# to another one with a bigger number.)
Expand Down
6 changes: 3 additions & 3 deletions src/opers.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ Obj FuncWITH_HIDDEN_IMPS_FLAGS(Obj self, Obj flags)
"you can replace <flags> via 'return <flags>;'" );
}

#ifdef HPCGAP
RegionWriteLock(REGION(WITH_HIDDEN_IMPS_FLAGS_CACHE));
#endif
Int changed, i, lastand, stop;
Int hidden_imps_length = LEN_PLIST(HIDDEN_IMPS) / 2;
Int base_hash = INT_INTOBJ(FuncHASH_FLAGS(0, flags)) % HIDDEN_IMPS_CACHE_LENGTH;
Expand All @@ -751,9 +754,6 @@ Obj FuncWITH_HIDDEN_IMPS_FLAGS(Obj self, Obj flags)
Int old_moving;
Obj with = flags;

#ifdef HPCGAP
RegionWriteLock(REGION(WITH_HIDDEN_IMPS_FLAGS_CACHE));
#endif
for(hash_loop = 0; hash_loop < 3; ++hash_loop)
{
cacheval = ELM_PLIST(WITH_HIDDEN_IMPS_FLAGS_CACHE, hash*2+1);
Expand Down

0 comments on commit 22eade5

Please sign in to comment.