40 lines
892 B
XML
40 lines
892 B
XML
|
<refentry id="sclock">
|
||
|
<refmeta>
|
||
|
<refentrytitle>sc_lock</refentrytitle>
|
||
|
<manvolnum>3</manvolnum>
|
||
|
<refmiscinfo>opensc</refmiscinfo>
|
||
|
</refmeta>
|
||
|
|
||
|
<refnamediv>
|
||
|
<refname>sc_lock</refname>
|
||
|
<refpurpose>Lock a card for exclusive use</refpurpose>
|
||
|
</refnamediv>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Synopsis</title>
|
||
|
<para>
|
||
|
<programlisting>
|
||
|
#include <opensc.h>
|
||
|
|
||
|
int sc_lock(struct sc_card *card);
|
||
|
</programlisting>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Description</title>
|
||
|
<para>
|
||
|
This function locks the card against modification from other threads or processes. The function
|
||
|
may be called several times; a counter will be increased, and the card will be unlocked only
|
||
|
when this counter reaches zero.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1>
|
||
|
<title>Return value</title>
|
||
|
<para>
|
||
|
Returns 0 on success, or a negative value in case of error.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|