summaryrefslogtreecommitdiffstats
path: root/source3/locking/locking_shm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
committerJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
commit693480af8bb2d3e83566af9463ca427f47a879da (patch)
treecb7070685621c8b4ffd651c8108e1450bf3272d9 /source3/locking/locking_shm.c
parentd2e0d0f73bfce64665feb386e2cc4032258ad437 (diff)
downloadsamba-693480af8bb2d3e83566af9463ca427f47a879da.tar.gz
samba-693480af8bb2d3e83566af9463ca427f47a879da.tar.xz
samba-693480af8bb2d3e83566af9463ca427f47a879da.zip
configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy. (This used to be commit 3d9ec96de5e04e83abafe9c5d980bd39eee856ea)
Diffstat (limited to 'source3/locking/locking_shm.c')
-rw-r--r--source3/locking/locking_shm.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c
index cded5e628d..909bdb78e4 100644
--- a/source3/locking/locking_shm.c
+++ b/source3/locking/locking_shm.c
@@ -45,8 +45,8 @@ typedef struct
{
int next_offset; /* offset of next record in chain from hash bucket */
int locking_version;
- int32 st_dev;
- int32 st_ino;
+ SMB_DEV_T st_dev;
+ SMB_INO_T st_ino;
int num_share_mode_entries;
int share_mode_entries; /* Chain of share mode entries for this file */
char file_name[1];
@@ -63,7 +63,7 @@ static int read_only;
/* Conversion to hash entry index from device and inode numbers. */
-#define HASH_ENTRY(dev,ino) ((((uint32)(dev)) ^ ((uint32)(ino))) % shmops->hash_size())
+#define HASH_ENTRY(dev,ino) ((unsigned int)(((dev) ^ (ino)) % shmops->hash_size()))
/*******************************************************************
@@ -78,7 +78,7 @@ static BOOL shm_stop_share_mode_mgmt(void)
lock a hash bucket entry in shared memory for share_mode management
******************************************************************/
static BOOL shm_lock_share_entry(connection_struct *conn,
- uint32 dev, uint32 inode, int *ptok)
+ SMB_DEV_T dev, SMB_INO_T inode, int *ptok)
{
return shmops->lock_hash_entry(HASH_ENTRY(dev, inode));
}
@@ -87,7 +87,7 @@ static BOOL shm_lock_share_entry(connection_struct *conn,
unlock a hash bucket entry in shared memory for share_mode management
******************************************************************/
static BOOL shm_unlock_share_entry(connection_struct *conn,
- uint32 dev, uint32 inode, int token)
+ SMB_DEV_T dev, SMB_INO_T inode, int token)
{
return shmops->unlock_hash_entry(HASH_ENTRY(dev, inode));
}
@@ -96,7 +96,7 @@ static BOOL shm_unlock_share_entry(connection_struct *conn,
get all share mode entries in shared memory for a dev/inode pair.
********************************************************************/
static int shm_get_share_modes(connection_struct *conn,
- int token, uint32 dev, uint32 inode,
+ int token, SMB_DEV_T dev, SMB_INO_T inode,
share_mode_entry **old_shares)
{
int *mode_array;
@@ -259,7 +259,8 @@ del the share mode of a file.
********************************************************************/
static void shm_del_share_mode(int token, files_struct *fsp)
{
- uint32 dev, inode;
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
int *mode_array;
unsigned int hash_entry;
share_mode_record *file_scanner_p;
@@ -387,7 +388,8 @@ set the share mode of a file. Return False on fail, True on success.
********************************************************************/
static BOOL shm_set_share_mode(int token, files_struct *fsp, uint16 port, uint16 op_type)
{
- int32 dev, inode;
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
int *mode_array;
unsigned int hash_entry;
share_mode_record *file_scanner_p;
@@ -495,7 +497,8 @@ Remove an oplock port and mode entry from a share mode.
********************************************************************/
static BOOL shm_remove_share_oplock(files_struct *fsp, int token)
{
- uint32 dev, inode;
+ SMB_DEV_T dev;
+ SMB_INO_T inode;
int *mode_array;
unsigned int hash_entry;
share_mode_record *file_scanner_p;
@@ -696,6 +699,3 @@ struct share_ops *locking_shm_init(int ronly)
int locking_shm_dummy_procedure(void)
{return 0;}
#endif /* FAST_SHARE_MODES */
-
-
-