Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
sharedfileset.h38 linesDownload Raw Back to storage
1/*-------------------------------------------------------------------------2 *3 * sharedfileset.h4 *	  Shared temporary file management.5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/storage/sharedfileset.h11 *12 *-------------------------------------------------------------------------13 */14 15#ifndef SHAREDFILESET_H16#define SHAREDFILESET_H17 18#include "storage/dsm.h"19#include "storage/fd.h"20#include "storage/fileset.h"21#include "storage/spin.h"22 23/*24 * A set of temporary files that can be shared by multiple backends.25 */26typedef struct SharedFileSet27{28	FileSet		fs;29	slock_t		mutex;			/* mutex protecting the reference count */30	int			refcnt;			/* number of attached backends */31} SharedFileSet;32 33extern void SharedFileSetInit(SharedFileSet *fileset, dsm_segment *seg);34extern void SharedFileSetAttach(SharedFileSet *fileset, dsm_segment *seg);35extern void SharedFileSetDeleteAll(SharedFileSet *fileset);36 37#endif38 
codekingpro/portable-devtools · Team Ai