/* $Cambridge: hermes/src/prayer/lib/mymutex.h,v 1.3 2008/09/16 09:59:57 dpc22 Exp $ */

/************************************************
 *    Prayer - a Webmail Interface              *
 ************************************************/

/* Copyright (c) University of Cambridge 2000 - 2008 */
/* See the file NOTICE for conditions of use and distribution. */

struct mymutex;  /* Opaque, implementation dependant */

struct mymutex *
mymutex_create(struct pool *pool, char *lock_dir, char *name);

void
mymutex_free(struct mymutex *mymutex);

BOOL
mymutex_slave_init(struct mymutex *mymutex);

void
mymutex_slave_cleanup(struct mymutex *mymutex);

BOOL
mymutex_on(struct mymutex *mymutex, int timeout);

BOOL
mymutex_off(struct mymutex *mymutex);

