[#MaybeCheckNotHeld-07]
= MaybeCheckNotHeld
:mrdocs:

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

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1892a1c8), lock&lowbar;returned(cs), requires&lowbar;capability(0x7f2e18c10528), requires&lowbar;capability(0x7f2e324d98f8), requires&lowbar;capability(0x7f2e402536a8), requires&lowbar;capability(0x7f2e36f53d88), requires&lowbar;capability(0x7f2e2a2fed08), requires&lowbar;capability(0x7f2e37b26df8), requires&lowbar;capability(0x7f2e301230e8), requires&lowbar;capability(0x7f2e3b4d46e8), requires&lowbar;capability(0x7f2e22086418), requires&lowbar;capability(0x7f2e25f33198), requires&lowbar;capability(0x7f2e42e80ee8), requires&lowbar;capability(0x7f2e3ba27968), requires&lowbar;capability(0x7f2e31c46cf8), requires&lowbar;capability(0x7f2e225a2a68), requires&lowbar;capability(0x7f2e32364a48), requires&lowbar;capability(0x7f2e362359b8), requires&lowbar;capability(0x7f2e23dd7058), requires&lowbar;capability(0x7f2e1c706f58), requires&lowbar;capability(0x7f2e21ec9248), requires&lowbar;capability(0x7f2e3043f788), requires&lowbar;capability(0x7f2e36bf35c8), requires&lowbar;capability(0x7f2e33a4c7e8), requires&lowbar;capability(0x7f2e2253a448), requires&lowbar;capability(0x7f2e1bc298c8), requires&lowbar;capability(0x7f2e29c6af88), requires&lowbar;capability(0x7f2e19a5b8c8), requires&lowbar;capability(0x7f2e146d5a98), requires&lowbar;capability(0x7f2e41a6ce88), requires&lowbar;capability(0x7f2e36f4c368), requires&lowbar;capability(0x7f2e1be61378), requires&lowbar;capability(0x7f2e30e44708), requires&lowbar;capability(0x7f2e29cd2bc8), requires&lowbar;capability(0x7f2e3aa8faf8), requires&lowbar;capability(0x7f2e43f22f58), requires&lowbar;capability(0x7f2e30e1a818), requires&lowbar;capability(0x7f2e232112d8), requires&lowbar;capability(0x7f2e362ddd28), requires&lowbar;capability(0x7f2e1419ed48), requires&lowbar;capability(0x7f2e357b9668), requires&lowbar;capability(0x7f2e188a2288), requires&lowbar;capability(0x7f2e24904d48), requires&lowbar;capability(0x7f2e28580798), requires&lowbar;capability(0x7f2e3ad5afc8), requires&lowbar;capability(0x7f2e3376b988), requires&lowbar;capability(0x7f2e370f11c8), requires&lowbar;capability(0x7f2e30c0b668), requires&lowbar;capability(0x7f2e2a6b1e88), requires&lowbar;capability(0x7f2e0800d8d8), requires&lowbar;capability(0x7f2e3ab4de48), requires&lowbar;capability(0x7f2e26d2fbb8), requires&lowbar;capability(0x7f2e1d2c93b8), requires&lowbar;capability(0x7f2e08465298), requires&lowbar;capability(0x7f2e1c59bfa8), requires&lowbar;capability(0x7f2e38a10c58), requires&lowbar;capability(0x7f2e140635b8), requires&lowbar;capability(0x7f2e19761f88), requires&lowbar;capability(0x7f2e2ab627d8), requires&lowbar;capability(0x7f2e42e83ed8), requires&lowbar;capability(0x7f2e241841b8), requires&lowbar;capability(0x7f2e3a6c7f48), requires&lowbar;capability(0x7f2e11f18638), requires&lowbar;capability(0x7f2e1446d828), requires&lowbar;capability(0x7f2e19a7a608), requires&lowbar;capability(0x7f2e297bb6c8), requires&lowbar;capability(0x7f2e31e49228), requires&lowbar;capability(0x7f2e395e1f88), requires&lowbar;capability(0x7f2e403c8038), requires&lowbar;capability(0x7f2e31040608), requires&lowbar;capability(0x7f2e22233ca8), requires&lowbar;capability(0x7f2e1b679da8), requires&lowbar;capability(0x7f2e33028178), requires&lowbar;capability(0x7f2e36fe5328), requires&lowbar;capability(0x7f2e3840bb18), requires&lowbar;capability(0x7f2e23929fa8), requires&lowbar;capability(0x7f2e28ce4f58), requires&lowbar;capability(0x7f2e312683e8), requires&lowbar;capability(0x7f2e35bea7d8), requires&lowbar;capability(0x7f2e1e8ab478)&rsqb;&rsqb;
xref:Mutex.adoc[Mutex]&
MaybeCheckNotHeld(xref:Mutex.adoc[Mutex]& cs);
----

== Return Value

The same mutex reference&period;

== Parameters

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


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