Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# threads

## Name

threads --

## Synopsis

    struct      xmlMutex;
    typedef     xmlMutexPtr;
    struct      xmlRMutex;
    typedef     xmlRMutexPtr;
    xmlMutexPtr xmlNewMutex                     (void);
    void        xmlMutexLock                    (xmlMutexPtr tok);
    void        xmlMutexUnlock                  (xmlMutexPtr tok);
    void        xmlFreeMutex                    (xmlMutexPtr tok);
    xmlRMutexPtr xmlNewRMutex                   (void);
    void        xmlRMutexLock                   (xmlRMutexPtr tok);
    void        xmlRMutexUnlock                 (xmlRMutexPtr tok);
    void        xmlFreeRMutex                   (xmlRMutexPtr tok);
    void        xmlInitThreads                  (void);
    void        xmlLockLibrary                  (void);
    void        xmlUnlockLibrary                (void);
    int         xmlGetThreadId                  (void);
    int         xmlIsMainThread                 (void);
    void        xmlCleanupThreads               (void);
    xmlGlobalStatePtr xmlGetGlobalState         (void);

## Description

## Details

### struct xmlMutex

    struct xmlMutex;

### xmlMutexPtr

### struct xmlRMutex

    struct xmlRMutex;

### xmlRMutexPtr

### xmlNewMutex ()

    xmlMutexPtr xmlNewMutex                     (void);

xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.

Returns : |

### xmlMutexLock ()

    void        xmlMutexLock                    (xmlMutexPtr tok);

xmlMutexLock() is used to lock a libxml2 token.

`tok` : |

### xmlMutexUnlock ()

    void        xmlMutexUnlock                  (xmlMutexPtr tok);

xmlMutexUnlock() is used to unlock a libxml2 token.

`tok` : |

### xmlFreeMutex ()

    void        xmlFreeMutex                    (xmlMutexPtr tok);

xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.

`tok` : |

### xmlNewRMutex ()

    xmlRMutexPtr xmlNewRMutex                   (void);

xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.

Returns : |

### xmlRMutexLock ()

    void        xmlRMutexLock                   (xmlRMutexPtr tok);

xmlRMutexLock() is used to lock a libxml2 token_r.

`tok` : |

### xmlRMutexUnlock ()

    void        xmlRMutexUnlock                 (xmlRMutexPtr tok);

xmlRMutexUnlock() is used to unlock a libxml2 token_r.

`tok` : |

### xmlFreeRMutex ()

    void        xmlFreeRMutex                   (xmlRMutexPtr tok);

xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.

`tok` : |

### xmlInitThreads ()

    void        xmlInitThreads                  (void);

xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.

### xmlLockLibrary ()

    void        xmlLockLibrary                  (void);

xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.

### xmlUnlockLibrary ()

    void        xmlUnlockLibrary                (void);

xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.

### xmlGetThreadId ()

    int         xmlGetThreadId                  (void);

xmlGetThreadId() find the current thread ID number

Returns : |

### xmlIsMainThread ()

    int         xmlIsMainThread                 (void);

xmlIsMainThread() check whether the current thread is the main thread.

Returns : |

### xmlCleanupThreads ()

    void        xmlCleanupThreads               (void);

xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended.

### xmlGetGlobalState ()

    xmlGlobalStatePtr xmlGetGlobalState         (void);

xmlGetGlobalState() is called to retrieve the global state for a thread.

Returns : |

<<< Previous Page | Home | Up | Next Page >>>
c14n | globals