GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ZMUTEX (3)

.ds Aq ’

NAME

zmutex - working with mutexes (deprecated)

CONTENTS

SYNOPSIS

//  Create a new mutex container
CZMQ_EXPORT zmutex_t *
    zmutex_new (void);

// Destroy a mutex container CZMQ_EXPORT void zmutex_destroy (zmutex_t **self_p);

// Lock mutex CZMQ_EXPORT void zmutex_lock (zmutex_t *self);

// Unlock mutex CZMQ_EXPORT void zmutex_unlock (zmutex_t *self);

// Try to lock mutex CZMQ_EXPORT int zmutex_try_lock (zmutex_t *self);

// Self test of this class CZMQ_EXPORT void zmutex_test (bool verbose);

DESCRIPTION

The zmutex class provides a portable wrapper for mutexes. Please do not use this class to do multi-threading. It is for the rare case where you absolutely need thread-safe global state. This should happen in system code only. DO NOT USE THIS TO SHARE SOCKETS BETWEEN THREADS, OR DARK THINGS WILL HAPPEN TO YOUR CODE.

Please add @discuss section in ../src/zmutex.c.

EXAMPLE

From zmutex_test method.

zmutex_t *mutex = zmutex_new ();
assert (mutex);
zmutex_lock (mutex);
zmutex_unlock (mutex);
zmutex_destroy (&mutex);

AUTHORS

The czmq manual was written by the authors in the AUTHORS file.

RESOURCES

Main web site: \m[blue] \m[]

Report bugs to the email <\m[blue]zeromq-dev@lists.zeromq.org\m[][1]>

COPYRIGHT

Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com Copyright other contributors as noted in the AUTHORS file. This file is part of CZMQ, the high-level C binding for 0MQ: http://czmq.zeromq.org This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. LICENSE included with the czmq distribution.

NOTES

1. zeromq-dev@lists.zeromq.org  mailto:zeromq-dev@lists.zeromq.org
Search for    or go to Top of page |  Section 3 |  Main Index


CZMQ 3&.0&.1 ZMUTEX (3) 06/01/2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.