## semaphore

semaphore

## Synopsis

                        VipsSemaphore;
    int                 vips_semaphore_up                   (VipsSemaphore *s);
    int                 vips_semaphore_down                 (VipsSemaphore *s);
    int                 vips_semaphore_upn                  (VipsSemaphore *s,
                                                             int n);
    int                 vips_semaphore_downn                (VipsSemaphore *s,
                                                             int n);
    void                vips_semaphore_destroy              (VipsSemaphore *s);
    void                vips_semaphore_init                 (VipsSemaphore *s,
                                                             int v,
                                                             char *name);

## Description

## Details

### VipsSemaphore

    typedef struct {
    	char *name;
    	int v;

    	GMutex *mutex;
    	GCond *cond;
    } VipsSemaphore;

### vips_semaphore_up ()

    int                 vips_semaphore_up                   (VipsSemaphore *s);

### vips_semaphore_down ()

    int                 vips_semaphore_down                 (VipsSemaphore *s);

### vips_semaphore_upn ()

    int                 vips_semaphore_upn                  (VipsSemaphore *s,
                                                             int n);

### vips_semaphore_downn ()

    int                 vips_semaphore_downn                (VipsSemaphore *s,
                                                             int n);

### vips_semaphore_destroy ()

    void                vips_semaphore_destroy              (VipsSemaphore *s);

### vips_semaphore_init ()

    void                vips_semaphore_init                 (VipsSemaphore *s,
                                                             int v,
                                                             char *name);