*
* Author: S. Piccardi
*
- * $Id: Gapil.h,v 1.3 2002/12/05 23:38:22 piccardi Exp $
+ * $Id: Gapil.h,v 1.4 2003/01/04 17:24:30 piccardi Exp $
*
*****************************************************************************/
#include <sys/sem.h> /* IPC semaphore declarations */
#include <unistd.h> /* unix standard functions */
#include <fcntl.h> /* file control (lock) functions */
#include <signal.h> /* signal handling declarations */
+#include <dirent.h> /* directory scan functions */
/*
* Definition of semun struct; used to implement a MutexXXXX API To
* create a Mutex use an underlaying semaphore and init it; we put
inline int MutexLock(int sem_id);
/* Function MutexUnlock: to unlock a mutex/semaphore. See Mutex.c */
inline int MutexUnlock(int sem_id);
+/* Function MutexRemove: remove the mutex/semphore. See Mutex.c */
+inline int MutexRemove(int sem_id);
/* Function LockMutex: acquire a mutex (using file locking). See Mutex.c */
inline int LockFile(const char* path_name);
/* Function UnlockMutex: release a mutex (using file locking). See Mutex.c */
ssize_t SockRead(int fd, void *buf, size_t count);
/* Function SockWrite: to read from a socket. See SockWrite.c */
ssize_t SockWrite(int fd, const void *buf, size_t count);
+/*
+ * File miscellaneous
+ */
+/* Function DirScan: simple scan for a directory */
+int DirScan(char * dirname, int(*compute)(struct dirent *));