2023-08-01 16:24:01 -04:00
|
|
|
#ifndef HAGGIS_LINKLIST
|
|
|
|
#define HAGGIS_LINKLIST
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
struct _haggis_hardlink {
|
|
|
|
struct _haggis_hardlink *next;
|
|
|
|
ino_t inode;
|
|
|
|
char *fname;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _haggis_hardlink haggis_hardlink;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
pthread_mutex_t *mutex;
|
|
|
|
haggis_hardlink *head;
|
|
|
|
} haggis_hardlink_list;
|
|
|
|
|
2023-08-07 18:55:47 -04:00
|
|
|
char* haggis_linklist_get_or_put(haggis_hardlink_list *list, ino_t inode, char *fname);
|
|
|
|
|
2023-08-01 16:24:01 -04:00
|
|
|
#endif // !HAGGIS_LINKLIST
|