Lines Matching refs:ACQUIRED_BEFORE
10 #define ACQUIRED_BEFORE(...) __attribute__ ((acquired_before(__VA_ARGS__)))
502 #if !__has_attribute(acquired_before)
503 #error "Should support acquired_before attribute"
506 Mutex mu_ab ACQUIRED_BEFORE(mu1);
508 Mutex ab_var_noargs __attribute__((acquired_before)); // \
509 // expected-error {{'acquired_before' attribute takes at least 1 argument}}
513 Mutex ab_field_noargs __attribute__((acquired_before)); // \
514 // expected-error {{'acquired_before' attribute takes at least 1 argument}}
515 Mutex ab_field_args ACQUIRED_BEFORE(mu1);
518 class ACQUIRED_BEFORE(mu1) AB { // \
519 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
522 void ab_function() ACQUIRED_BEFORE(mu1); // \
523 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
525 void ab_function_params(int gv_lvar ACQUIRED_BEFORE(mu1)); // \
526 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
529 Mutex x ACQUIRED_BEFORE(mu1) = Mutex(); // \
530 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
533 // Note: illegal int ab_int ACQUIRED_BEFORE(mu1) will
539 Mutex ab_var_arg_1 ACQUIRED_BEFORE(muWrapper.mu);
540 Mutex ab_var_arg_2 ACQUIRED_BEFORE(muDoubleWrapper.muWrapper->mu);
541 Mutex ab_var_arg_3 ACQUIRED_BEFORE(muWrapper.getMu());
542 Mutex ab_var_arg_4 ACQUIRED_BEFORE(*muWrapper.getMuPointer());
543 Mutex ab_var_arg_5 ACQUIRED_BEFORE(&mu1);
544 Mutex ab_var_arg_6 ACQUIRED_BEFORE(muRef);
545 Mutex ab_var_arg_7 ACQUIRED_BEFORE(muDoubleWrapper.getWrapper()->getMu());
546 Mutex ab_var_arg_8 ACQUIRED_BEFORE(muPointer);
550 Mutex ab_var_arg_bad_1 ACQUIRED_BEFORE(1); // \
551 // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
552 Mutex ab_var_arg_bad_2 ACQUIRED_BEFORE("mu"); // \
553 // expected-warning {{ignoring 'acquired_before' attribute because its argument is invalid}}
554 Mutex ab_var_arg_bad_3 ACQUIRED_BEFORE(muDoublePointer); // \
555 // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
556 Mutex ab_var_arg_bad_4 ACQUIRED_BEFORE(umu); // \
557 // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute}}
558 UnlockableMu ab_var_arg_bad_5 ACQUIRED_BEFORE(mu_ab); // \
559 // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}}