Ignore:
Timestamp:
Feb 28, 2017, 4:21:15 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
20221d4
Parents:
cc7f4b1
Message:

added support for acquiring multiple monitors at once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor.c

    rcc7f4b1 r2781e65  
    7171        }
    7272}
     73
     74void enter(__monitor_t ** monitors, int count) {
     75        for(int i = 0; i < count; i++) {
     76                // printf("%d\n", i);
     77                enter( monitors[i] );
     78        }
     79}
     80
     81void leave(__monitor_t ** monitors, int count) {
     82        for(int i = count - 1; i >= 0; i--) {
     83                // printf("%d\n", i);
     84                leave( monitors[i] );
     85        }
     86}
Note: See TracChangeset for help on using the changeset viewer.