• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/openmp/runtime/src/

Lines Matching defs:flag

198                                   kmp_info_t *th, C *flag) {
230 // check if the flag and cv counters are in consistent state
233 typename C::flag_t old_f = flag->set_sleeping();
234 if (!flag->done_check_val(old_f & ~KMP_BARRIER_SLEEP_STATE)) {
239 old_f = flag->unset_sleeping();
243 "fulfilled: flag's loc(%p): %u => %u\n",
244 flag->get(), old_f, *(flag->get())));
355 sleep bit for the indicated flag variable to true. */
357 static inline void __kmp_suspend_template(int th_gtid, C *flag) {
362 KF_TRACE(30, ("__kmp_suspend_template: T#%d enter for flag's loc(%p)\n",
363 th_gtid, flag->get()));
368 KF_TRACE(10, ("__kmp_suspend_template: T#%d setting sleep bit for flag's"
370 th_gtid, flag->get()));
374 old_spin = flag->set_sleeping();
377 flag->unset_sleeping();
382 KF_TRACE(5, ("__kmp_suspend_template: T#%d set sleep bit for flag's"
384 th_gtid, flag->get(), *(flag->get())));
386 if (flag->done_check_val(old_spin)) {
387 old_spin = flag->unset_sleeping();
389 "for flag's loc(%p)\n",
390 th_gtid, flag->get()));
399 TCW_PTR(th->th.th_sleep_loc, (void *)flag);
400 while (flag->is_sleeping()) {
415 flag);
418 flag);
422 if (flag->is_sleeping()) {
445 void __kmp_suspend_32(int th_gtid, kmp_flag_32 *flag) {
446 __kmp_suspend_template(th_gtid, flag);
448 void __kmp_suspend_64(int th_gtid, kmp_flag_64 *flag) {
449 __kmp_suspend_template(th_gtid, flag);
451 void __kmp_suspend_oncore(int th_gtid, kmp_flag_oncore *flag) {
452 __kmp_suspend_template(th_gtid, flag);
456 after setting the sleep bit indicated by the flag argument to FALSE */
458 static inline void __kmp_resume_template(int target_gtid, C *flag) {
472 if (!flag) { // coming from __kmp_null_resume_wrapper
473 flag = (C *)th->th.th_sleep_loc;
476 // First, check if the flag is null or its type has changed. If so, someone
478 if (!flag || flag->get_type() != flag->get_ptr_type()) { // get_ptr_type
480 // flag was cast to
482 "awake: flag's loc(%p)\n",
487 typename C::flag_t old_spin = flag->unset_sleeping();
488 if (!flag->is_sleeping_val(old_spin)) {
490 "awake: flag's loc(%p): %u => %u\n",
491 gtid, target_gtid, flag->get(), old_spin, *(flag->get())));
498 "bit for flag's loc(%p)\n",
499 gtid, target_gtid, flag->get()));
509 void __kmp_resume_32(int target_gtid, kmp_flag_32 *flag) {
510 __kmp_resume_template(target_gtid, flag);
512 void __kmp_resume_64(int target_gtid, kmp_flag_64 *flag) {
513 __kmp_resume_template(target_gtid, flag);
515 void __kmp_resume_oncore(int target_gtid, kmp_flag_oncore *flag) {
516 __kmp_resume_template(target_gtid, flag);
1270 1. Windows* OS keep thread alive after it resets ds_alive flag and
1273 2. Windows* OS may kill thread before it resets ds_alive flag.