[Openmp-dev] [locking] adaptive locking case
Cownie, James H via Openmp-dev
openmp-dev at lists.llvm.org
Wed Feb 17 04:10:34 PST 2016
Indeed, it looks wrong. Please submit a bug report at https://llvm.org/bugs/ and/or a patch.
It doesn’t seem that hard to fix :-)
-- Jim
James Cownie <james.h.cownie at intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438
-----Original Message-----
From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf Of Paul Osmialowski via Openmp-dev
Sent: Wednesday, February 17, 2016 12:03 PM
To: openmp-dev (openmp-dev at lists.llvm.org) <openmp-dev at lists.llvm.org>
Subject: [Openmp-dev] [locking] adaptive locking case
Hello,
In __kmp_get_user_lock_owner() function in kmp_lock.cpp I've found
following switch:
switch (seq) {
case lockseq_tas:
case lockseq_nested_tas:
return __kmp_get_tas_lock_owner((kmp_tas_lock_t *)lck);
#if KMP_HAS_FUTEX
case lockseq_futex:
case lockseq_nested_futex:
return __kmp_get_futex_lock_owner((kmp_futex_lock_t *)lck);
#endif
case lockseq_ticket:
case lockseq_nested_ticket:
return __kmp_get_ticket_lock_owner((kmp_ticket_lock_t *)lck);
case lockseq_queuing:
case lockseq_nested_queuing:
#if KMP_USE_ADAPTIVE_LOCKS
case lockseq_adaptive:
return __kmp_get_queuing_lock_owner((kmp_queuing_lock_t *)lck);
#endif
case lockseq_drdpa:
case lockseq_nested_drdpa:
return __kmp_get_drdpa_lock_owner((kmp_drdpa_lock_t *)lck);
default:
return 0;
}
Seems like '#endif' correspondig to '#if KMP_USE_ADAPTIVE_LOCKS' was
placed one line too low causing queuing and nested queuing lock cases
are currently handled by drdpa lock case function when
KMP_USE_ADAPTIVE_LOCKS is not 1.
Cheers,
Paul
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Openmp-dev
mailing list