Changeset 5434d04 for src/libcfa
- Timestamp:
- Oct 30, 2017, 6:24:31 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- e1e8408, fa477f7
- Parents:
- 2ba0bc7 (diff), 8a48f4b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/libcfa
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
r2ba0bc7 r5434d04 21 21 #include "kernel_private.h" 22 22 23 #include "bits/algorithms.h" 24 23 25 //----------------------------------------------------------------------------- 24 26 // Forward declarations … … 291 293 292 294 // Sort monitors based on address -> TODO use a sort specialized for small numbers 293 qsort(this.m, count);295 __libcfa_small_sort(this.m, count); 294 296 295 297 // Save previous thread context … … 492 494 set_owner( monitors, count, signallee ); 493 495 496 LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : signal_block condition %p (s: %p)\n", this, signallee ); 497 494 498 //Everything is ready to go to sleep 495 499 BlockInternal( locks, count, &signallee, 1 ); … … 498 502 // WE WOKE UP 499 503 504 505 LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : signal_block returned\n" ); 500 506 501 507 //We are back, restore the masks and recursions … … 869 875 short size = 0; 870 876 for( int i = 0; i < mask.size; i++ ) { 871 qsort( mask.clauses[i].list, mask.clauses[i].size );877 __libcfa_small_sort( mask.clauses[i].list, mask.clauses[i].size ); 872 878 for( int j = 0; j < mask.clauses[i].size; j++) { 873 879 insert_unique( storage, size, mask.clauses[i].list[j] ); … … 875 881 } 876 882 // TODO insertion sort instead of this 877 qsort( storage, size );883 __libcfa_small_sort( storage, size ); 878 884 return size; 879 885 }
Note: See TracChangeset
for help on using the changeset viewer.