Lines Matching refs:ACQUIRED_BEFORE
10 #define ACQUIRED_BEFORE(...) __attribute__ ((acquired_before(__VA_ARGS__)))
500 #if !__has_attribute(acquired_before)
501 #error "Should support acquired_before attribute"
504 Mutex mu_ab ACQUIRED_BEFORE(mu1);
506 Mutex ab_var_noargs __attribute__((acquired_before)); // \
511 Mutex ab_field_noargs __attribute__((acquired_before)); // \
513 Mutex ab_field_args ACQUIRED_BEFORE(mu1);
516 class ACQUIRED_BEFORE(mu1) AB { // \
517 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
520 void ab_function() ACQUIRED_BEFORE(mu1); // \
521 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
523 void ab_function_params(int gv_lvar ACQUIRED_BEFORE(mu1)); // \
524 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
527 Mutex x ACQUIRED_BEFORE(mu1) = Mutex(); // \
528 // expected-warning {{'acquired_before' attribute only applies to fields and global variables}}
531 // Note: illegal int ab_int ACQUIRED_BEFORE(mu1) will
537 Mutex ab_var_arg_1 ACQUIRED_BEFORE(muWrapper.mu);
538 Mutex ab_var_arg_2 ACQUIRED_BEFORE(muDoubleWrapper.muWrapper->mu);
539 Mutex ab_var_arg_3 ACQUIRED_BEFORE(muWrapper.getMu());
540 Mutex ab_var_arg_4 ACQUIRED_BEFORE(*muWrapper.getMuPointer());
541 Mutex ab_var_arg_5 ACQUIRED_BEFORE(&mu1);
542 Mutex ab_var_arg_6 ACQUIRED_BEFORE(muRef);
543 Mutex ab_var_arg_7 ACQUIRED_BEFORE(muDoubleWrapper.getWrapper()->getMu());
544 Mutex ab_var_arg_8 ACQUIRED_BEFORE(muPointer);
548 Mutex ab_var_arg_bad_1 ACQUIRED_BEFORE(1); // \
549 // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}}
550 Mutex ab_var_arg_bad_2 ACQUIRED_BEFORE("mu"); // \
551 // expected-warning {{ignoring 'acquired_before' attribute because its argument is invalid}}
552 Mutex ab_var_arg_bad_3 ACQUIRED_BEFORE(muDoublePointer); // \
553 // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}}
554 Mutex ab_var_arg_bad_4 ACQUIRED_BEFORE(umu); // \
555 // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'lockable' attribute}}
556 UnlockableMu ab_var_arg_bad_5 ACQUIRED_BEFORE(mu_ab); // \
557 // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'lockable' attribute}}