diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-22 11:15:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-22 11:15:14 +0000 |
commit | f20e6f6b261c3976b412845000b3f170f8ad6a9f (patch) | |
tree | 632a509ffcb26423433272e542b38e1510e9e990 /source3/include/smb.h | |
parent | e5c319186d079eeef55a7ee62fac2a993e932938 (diff) | |
download | samba-f20e6f6b261c3976b412845000b3f170f8ad6a9f.tar.gz samba-f20e6f6b261c3976b412845000b3f170f8ad6a9f.tar.bz2 samba-f20e6f6b261c3976b412845000b3f170f8ad6a9f.zip |
shared memory code cleanups (partly preparing for a possible sysV
shared memory implementation)
(This used to be commit 8d1993c71a5d5d32636f62ba9b9a9009ec74d730)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r-- | source3/include/smb.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 0965b6b90b..c982e3e78d 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -63,8 +63,7 @@ typedef int BOOL; /* offset in shared memory */ -typedef int smb_shm_offset_t; -#define NULL_OFFSET (smb_shm_offset_t)(0) +#define NULL_OFFSET (int)(0) /* limiting size of ipc replies */ #define REALLOC(ptr,size) Realloc(ptr,MAX((size),4*1024)) @@ -1273,6 +1272,22 @@ struct share_ops { void (*status)(FILE *); }; +/* each implementation of the shared memory code needs + to support the following operations */ +struct shmem_ops { + BOOL (*open)(char *, int ); + BOOL (*close)( void ); + int (*alloc)(int ); + BOOL (*free)(int ); + int (*get_userdef_off)(void); + void *(*offset2addr)(int ); + int (*addr2offset)(void *addr); + BOOL (*lock_hash_entry)(unsigned int); + BOOL (*unlock_hash_entry)( unsigned int ); + BOOL (*get_usage)(int *,int *,int *); +}; + + /* this is used for smbstatus */ struct connect_record { |