[#MaybeCheckNotHeld-0f]
= MaybeCheckNotHeld
:mrdocs:

`MaybeCheckNotHeld` overloads

== Synopses

Declared in `&lt;sync&period;h&gt;`

Require negative capability on a Mutex before locking it and pass it through&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9500841ce8), lock&lowbar;returned(cs), requires&lowbar;capability(0x7f9525cc75c8), requires&lowbar;capability(0x7f950db728d8), requires&lowbar;capability(0x7f951f578df8), requires&lowbar;capability(0x7f950c189448), requires&lowbar;capability(0x7f950e1b41b8), requires&lowbar;capability(0x7f9522ff7888), requires&lowbar;capability(0x7f951c783258), requires&lowbar;capability(0x7f951414f418), requires&lowbar;capability(0x7f950a044f78), requires&lowbar;capability(0x7f95020880a8), requires&lowbar;capability(0x7f9515b2a388), requires&lowbar;capability(0x7f9527a09fb8), requires&lowbar;capability(0x7f951c7953c8), requires&lowbar;capability(0x7f95220d66c8), requires&lowbar;capability(0x7f9503cc8248), requires&lowbar;capability(0x7f9527b0c7c8), requires&lowbar;capability(0x7f950db4cf48), requires&lowbar;capability(0x7f9525eef4c8), requires&lowbar;capability(0x7f9521a9a3d8), requires&lowbar;capability(0x7f951f7c27f8), requires&lowbar;capability(0x7f9527a70988), requires&lowbar;capability(0x7f9500b1c348), requires&lowbar;capability(0x7f950f391688), requires&lowbar;capability(0x7f9503460428), requires&lowbar;capability(0x7f950833bc88), requires&lowbar;capability(0x7f95039ce398), requires&lowbar;capability(0x7f9513c16178), requires&lowbar;capability(0x7f950fa3c8e8), requires&lowbar;capability(0x7f94f89591b8), requires&lowbar;capability(0x7f951d5933c8), requires&lowbar;capability(0x7f951715cf28), requires&lowbar;capability(0x7f95088b2d08), requires&lowbar;capability(0x7f951e622fd8), requires&lowbar;capability(0x7f950f8a8688), requires&lowbar;capability(0x7f94f0888948), requires&lowbar;capability(0x7f950e102a48), requires&lowbar;capability(0x7f9527a51aa8), requires&lowbar;capability(0x7f95104b2c78), requires&lowbar;capability(0x7f950bbe4618), requires&lowbar;capability(0x7f9517b77148), requires&lowbar;capability(0x7f951ea72d98), requires&lowbar;capability(0x7f950a203678), requires&lowbar;capability(0x7f9527c3caf8), requires&lowbar;capability(0x7f9513f89538), requires&lowbar;capability(0x7f9523f11958), requires&lowbar;capability(0x7f9516a0fd78), requires&lowbar;capability(0x7f95036734b8), requires&lowbar;capability(0x7f9513c3dd98), requires&lowbar;capability(0x7f9526266848), requires&lowbar;capability(0x7f9523c2f538), requires&lowbar;capability(0x7f951d2a33d8), requires&lowbar;capability(0x7f952678e408), requires&lowbar;capability(0x7f950165fc78), requires&lowbar;capability(0x7f95082c8388), requires&lowbar;capability(0x7f9523c2ab38), requires&lowbar;capability(0x7f9509279098), requires&lowbar;capability(0x7f951c5adb78), requires&lowbar;capability(0x7f950c2eccc8), requires&lowbar;capability(0x7f951250b268), requires&lowbar;capability(0x7f9508140b48), requires&lowbar;capability(0x7f95066ed2f8), requires&lowbar;capability(0x7f9510f53338), requires&lowbar;capability(0x7f9501a15d38), requires&lowbar;capability(0x7f9508b805d8), requires&lowbar;capability(0x7f952165fb98), requires&lowbar;capability(0x7f9517b0ee38), requires&lowbar;capability(0x7f9502e53fe8), requires&lowbar;capability(0x7f950da85ce8), requires&lowbar;capability(0x7f94fc853b58), requires&lowbar;capability(0x7f94f8a88538), requires&lowbar;capability(0x7f951fe81938), requires&lowbar;capability(0x7f94f066d948), requires&lowbar;capability(0x7f952503ce88), requires&lowbar;capability(0x7f950697eaa8), requires&lowbar;capability(0x7f9515b876b8), requires&lowbar;capability(0x7f95038511e8), requires&lowbar;capability(0x7f9514950378), requires&lowbar;capability(0x7f95157b9b28)&rsqb;&rsqb;
xref:Mutex.adoc[Mutex]&
xref:MaybeCheckNotHeld-07.adoc[MaybeCheckNotHeld](xref:Mutex.adoc[Mutex]& cs);
----

[.small]#xref:MaybeCheckNotHeld-07.adoc[_» more&period;&period;&period;_]#

Require negative capability on a Mutex before locking it and pass it through&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f95008421d0), lock&lowbar;returned(cs), requires&lowbar;capability(0x7f9525cc7ab0), requires&lowbar;capability(0x7f950db72dc0), requires&lowbar;capability(0x7f951f5792e0), requires&lowbar;capability(0x7f950c189930), requires&lowbar;capability(0x7f950e1b46a0), requires&lowbar;capability(0x7f9522ff7d70), requires&lowbar;capability(0x7f951c783740), requires&lowbar;capability(0x7f951414f900), requires&lowbar;capability(0x7f950a045460), requires&lowbar;capability(0x7f9502088590), requires&lowbar;capability(0x7f9515b2a870), requires&lowbar;capability(0x7f9527a0a4a0), requires&lowbar;capability(0x7f951c7958b0), requires&lowbar;capability(0x7f95220d6bb0), requires&lowbar;capability(0x7f9503cc8730), requires&lowbar;capability(0x7f9527b0ccb0), requires&lowbar;capability(0x7f950db4d430), requires&lowbar;capability(0x7f9525eef9b0), requires&lowbar;capability(0x7f9521a9a8c0), requires&lowbar;capability(0x7f951f7c2ce0), requires&lowbar;capability(0x7f9527a70e70), requires&lowbar;capability(0x7f9500b1c830), requires&lowbar;capability(0x7f950f391b70), requires&lowbar;capability(0x7f9503460910), requires&lowbar;capability(0x7f950833c170), requires&lowbar;capability(0x7f95039ce880), requires&lowbar;capability(0x7f9513c16660), requires&lowbar;capability(0x7f950fa3cdd0), requires&lowbar;capability(0x7f94f89596a0), requires&lowbar;capability(0x7f951d5938b0), requires&lowbar;capability(0x7f951715d410), requires&lowbar;capability(0x7f95088b31f0), requires&lowbar;capability(0x7f951e6234c0), requires&lowbar;capability(0x7f950f8a8b70), requires&lowbar;capability(0x7f94f0888e30), requires&lowbar;capability(0x7f950e102f30), requires&lowbar;capability(0x7f9527a51f90), requires&lowbar;capability(0x7f95104b3160), requires&lowbar;capability(0x7f950bbe4b00), requires&lowbar;capability(0x7f9517b77630), requires&lowbar;capability(0x7f951ea73280), requires&lowbar;capability(0x7f950a203b60), requires&lowbar;capability(0x7f9527c3cfe0), requires&lowbar;capability(0x7f9513f89a20), requires&lowbar;capability(0x7f9523f11e40), requires&lowbar;capability(0x7f9516a10260), requires&lowbar;capability(0x7f95036739a0), requires&lowbar;capability(0x7f9513c3e280), requires&lowbar;capability(0x7f9526266d30), requires&lowbar;capability(0x7f9523c2fa20), requires&lowbar;capability(0x7f951d2a38c0), requires&lowbar;capability(0x7f952678e8f0), requires&lowbar;capability(0x7f9501660160), requires&lowbar;capability(0x7f95082c8870), requires&lowbar;capability(0x7f9523c2b020), requires&lowbar;capability(0x7f9509279580), requires&lowbar;capability(0x7f951c5ae060), requires&lowbar;capability(0x7f950c2ed1b0), requires&lowbar;capability(0x7f951250b750), requires&lowbar;capability(0x7f9508141030), requires&lowbar;capability(0x7f95066ed7e0), requires&lowbar;capability(0x7f9510f53820), requires&lowbar;capability(0x7f9501a16220), requires&lowbar;capability(0x7f9508b80ac0), requires&lowbar;capability(0x7f9521660080), requires&lowbar;capability(0x7f9517b0f320), requires&lowbar;capability(0x7f9502e544d0), requires&lowbar;capability(0x7f950da861d0), requires&lowbar;capability(0x7f94fc854040), requires&lowbar;capability(0x7f94f8a88a20), requires&lowbar;capability(0x7f951fe81e20), requires&lowbar;capability(0x7f94f066de30), requires&lowbar;capability(0x7f952503d370), requires&lowbar;capability(0x7f950697ef90), requires&lowbar;capability(0x7f9515b87ba0), requires&lowbar;capability(0x7f95038516d0), requires&lowbar;capability(0x7f9514950860), requires&lowbar;capability(0x7f95157ba010)&rsqb;&rsqb;
xref:Mutex.adoc[Mutex]*
xref:MaybeCheckNotHeld-0a.adoc[MaybeCheckNotHeld](xref:Mutex.adoc[Mutex]* cs);
----

[.small]#xref:MaybeCheckNotHeld-0a.adoc[_» more&period;&period;&period;_]#

Check a GlobalMutex or RecursiveMutex is not held in scope and pass it through&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename MutexType&gt;
&lsqb;&lsqb;locks&lowbar;excluded(0x7f95008426b8), lock&lowbar;returned(m), locks&lowbar;excluded(0x7f9525cc7f98), locks&lowbar;excluded(0x7f950db732a8), locks&lowbar;excluded(0x7f951f5797c8), locks&lowbar;excluded(0x7f950c189e18), locks&lowbar;excluded(0x7f950e1b4b88), locks&lowbar;excluded(0x7f9522ff8258), locks&lowbar;excluded(0x7f951c783c28), locks&lowbar;excluded(0x7f951414fde8), locks&lowbar;excluded(0x7f950a045948), locks&lowbar;excluded(0x7f9502088a78), locks&lowbar;excluded(0x7f9515b2ad58), locks&lowbar;excluded(0x7f9527a0a988), locks&lowbar;excluded(0x7f951c795d98), locks&lowbar;excluded(0x7f95220d7098), locks&lowbar;excluded(0x7f9503cc8ca8), locks&lowbar;excluded(0x7f9527b0d198), locks&lowbar;excluded(0x7f950db4d918), locks&lowbar;excluded(0x7f9525eefe98), locks&lowbar;excluded(0x7f9521a9ada8), locks&lowbar;excluded(0x7f951f7c31c8), locks&lowbar;excluded(0x7f9527a71358), locks&lowbar;excluded(0x7f9500b1cd18), locks&lowbar;excluded(0x7f950f392058), locks&lowbar;excluded(0x7f9503460df8), locks&lowbar;excluded(0x7f950833c658), locks&lowbar;excluded(0x7f95039ced68), locks&lowbar;excluded(0x7f9513c16b48), locks&lowbar;excluded(0x7f950fa3d2b8), locks&lowbar;excluded(0x7f94f8959b88), locks&lowbar;excluded(0x7f951d593d98), locks&lowbar;excluded(0x7f951715d8f8), locks&lowbar;excluded(0x7f95088b36d8), locks&lowbar;excluded(0x7f951e6239a8), locks&lowbar;excluded(0x7f950f8a9058), locks&lowbar;excluded(0x7f94f0889318), locks&lowbar;excluded(0x7f950e103418), locks&lowbar;excluded(0x7f9527a52478), locks&lowbar;excluded(0x7f95104b3648), locks&lowbar;excluded(0x7f950bbe4fe8), locks&lowbar;excluded(0x7f9517b77b18), locks&lowbar;excluded(0x7f951ea73768), locks&lowbar;excluded(0x7f950a204048), locks&lowbar;excluded(0x7f9527c3d4c8), locks&lowbar;excluded(0x7f9513f89f08), locks&lowbar;excluded(0x7f9523f12328), locks&lowbar;excluded(0x7f9516a10748), locks&lowbar;excluded(0x7f9503673e88), locks&lowbar;excluded(0x7f9513c3e768), locks&lowbar;excluded(0x7f9526267218), locks&lowbar;excluded(0x7f9523c2ff08), locks&lowbar;excluded(0x7f951d2a3da8), locks&lowbar;excluded(0x7f952678edd8), locks&lowbar;excluded(0x7f9501660648), locks&lowbar;excluded(0x7f95082c8d58), locks&lowbar;excluded(0x7f9523c2b508), locks&lowbar;excluded(0x7f9509279a68), locks&lowbar;excluded(0x7f951c5ae548), locks&lowbar;excluded(0x7f950c2ed698), locks&lowbar;excluded(0x7f951250bc38), locks&lowbar;excluded(0x7f9508141518), locks&lowbar;excluded(0x7f95066edcc8), locks&lowbar;excluded(0x7f9510f53d08), locks&lowbar;excluded(0x7f9501a16708), locks&lowbar;excluded(0x7f9508b80fa8), locks&lowbar;excluded(0x7f9521660568), locks&lowbar;excluded(0x7f9517b0f808), locks&lowbar;excluded(0x7f9502e549b8), locks&lowbar;excluded(0x7f950da866b8), locks&lowbar;excluded(0x7f94fc854528), locks&lowbar;excluded(0x7f94f8a88f08), locks&lowbar;excluded(0x7f951fe82308), locks&lowbar;excluded(0x7f94f066e318), locks&lowbar;excluded(0x7f952503d858), locks&lowbar;excluded(0x7f950697f478), locks&lowbar;excluded(0x7f9515b88088), locks&lowbar;excluded(0x7f9503851bb8), locks&lowbar;excluded(0x7f9514950d48), locks&lowbar;excluded(0x7f95157ba4f8)&rsqb;&rsqb;
MutexType&
xref:MaybeCheckNotHeld-0b.adoc[MaybeCheckNotHeld](MutexType& m);
----

[.small]#xref:MaybeCheckNotHeld-0b.adoc[_» more&period;&period;&period;_]#

Check a GlobalMutex or RecursiveMutex is not held in scope and pass it through&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename MutexType&gt;
&lsqb;&lsqb;locks&lowbar;excluded(0x7f9500842ba8), lock&lowbar;returned(m), locks&lowbar;excluded(0x7f9525cc8488), locks&lowbar;excluded(0x7f950db73798), locks&lowbar;excluded(0x7f951f579cb8), locks&lowbar;excluded(0x7f950c18a308), locks&lowbar;excluded(0x7f950e1b5078), locks&lowbar;excluded(0x7f9522ff8748), locks&lowbar;excluded(0x7f951c784118), locks&lowbar;excluded(0x7f95141502d8), locks&lowbar;excluded(0x7f950a045e38), locks&lowbar;excluded(0x7f9502088f68), locks&lowbar;excluded(0x7f9515b2b248), locks&lowbar;excluded(0x7f9527a0ae78), locks&lowbar;excluded(0x7f951c796288), locks&lowbar;excluded(0x7f95220d7588), locks&lowbar;excluded(0x7f9503cc9198), locks&lowbar;excluded(0x7f9527b0d688), locks&lowbar;excluded(0x7f950db4de08), locks&lowbar;excluded(0x7f9525ef0388), locks&lowbar;excluded(0x7f9521a9b298), locks&lowbar;excluded(0x7f951f7c36b8), locks&lowbar;excluded(0x7f9527a71848), locks&lowbar;excluded(0x7f9500b1d208), locks&lowbar;excluded(0x7f950f392548), locks&lowbar;excluded(0x7f95034612e8), locks&lowbar;excluded(0x7f950833cb48), locks&lowbar;excluded(0x7f95039cf258), locks&lowbar;excluded(0x7f9513c17038), locks&lowbar;excluded(0x7f950fa3d7a8), locks&lowbar;excluded(0x7f94f895a078), locks&lowbar;excluded(0x7f951d594288), locks&lowbar;excluded(0x7f951715dde8), locks&lowbar;excluded(0x7f95088b3bc8), locks&lowbar;excluded(0x7f951e623e98), locks&lowbar;excluded(0x7f950f8a9548), locks&lowbar;excluded(0x7f94f0889808), locks&lowbar;excluded(0x7f950e103908), locks&lowbar;excluded(0x7f9527a52968), locks&lowbar;excluded(0x7f95104b3b38), locks&lowbar;excluded(0x7f950bbe54d8), locks&lowbar;excluded(0x7f9517b78008), locks&lowbar;excluded(0x7f951ea73c58), locks&lowbar;excluded(0x7f950a204538), locks&lowbar;excluded(0x7f9527c3d9b8), locks&lowbar;excluded(0x7f9513f8a3f8), locks&lowbar;excluded(0x7f9523f12818), locks&lowbar;excluded(0x7f9516a10c38), locks&lowbar;excluded(0x7f9503674378), locks&lowbar;excluded(0x7f9513c3ec58), locks&lowbar;excluded(0x7f9526267708), locks&lowbar;excluded(0x7f9523c303f8), locks&lowbar;excluded(0x7f951d2a4298), locks&lowbar;excluded(0x7f952678f2c8), locks&lowbar;excluded(0x7f9501660b38), locks&lowbar;excluded(0x7f95082c9248), locks&lowbar;excluded(0x7f9523c2b9f8), locks&lowbar;excluded(0x7f9509279f58), locks&lowbar;excluded(0x7f951c5aea38), locks&lowbar;excluded(0x7f950c2edb88), locks&lowbar;excluded(0x7f951250c128), locks&lowbar;excluded(0x7f9508141a08), locks&lowbar;excluded(0x7f95066ee1b8), locks&lowbar;excluded(0x7f9510f541f8), locks&lowbar;excluded(0x7f9501a16bf8), locks&lowbar;excluded(0x7f9508b81498), locks&lowbar;excluded(0x7f9521660a58), locks&lowbar;excluded(0x7f9517b0fcf8), locks&lowbar;excluded(0x7f9502e54ea8), locks&lowbar;excluded(0x7f950da86ba8), locks&lowbar;excluded(0x7f94fc854a18), locks&lowbar;excluded(0x7f94f8a893f8), locks&lowbar;excluded(0x7f951fe827f8), locks&lowbar;excluded(0x7f94f066e808), locks&lowbar;excluded(0x7f952503dd48), locks&lowbar;excluded(0x7f950697f968), locks&lowbar;excluded(0x7f9515b88578), locks&lowbar;excluded(0x7f95038520a8), locks&lowbar;excluded(0x7f9514951238), locks&lowbar;excluded(0x7f95157ba9e8)&rsqb;&rsqb;
MutexType*
xref:MaybeCheckNotHeld-01.adoc[MaybeCheckNotHeld](MutexType* m);
----

[.small]#xref:MaybeCheckNotHeld-01.adoc[_» more&period;&period;&period;_]#

== Return Value

* The same mutex reference&period;
* The same mutex pointer&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cs*
| Mutex about to be locked&period;
| *m*
| Mutex about to be locked&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
