Files
mars-nwe/include/nwshare.h
Mario Fetka 0994605aa8 nwshare: track physical-record set entries
Add physical-record entries to the shared synchronization set table.

The Novell SDK documents the physical-record set calls as operating on the
caller's logged data byte range table: Log Physical Record adds byte ranges,
Lock Physical Record Set locks all logged ranges, Release Physical Record Set
unlocks them while keeping them logged, and Clear Physical Record Set unlocks
and removes them.

MARS-NWE already used the shared set handler for file and logical-record sets.
Extend the same table with type 4 entries for physical records, storing the
NetWare file handle, start offset, record length, timeout, lock directive, and
current locked state.

Add a type 4 handler that reuses nw_log_physical_record() for set lock and
release operations, and export share_set_physrec_add_rm() so nwconn can
maintain the set table when individual physical-record calls log or clear
ranges.

This prepares the documented Physical Record Set endpoints to use the existing
byte-range lock implementation.
2026-05-29 23:21:19 +02:00

20 lines
872 B
C

/* nwshare.h: 25-Sep-99*/
/* (C)opyright (C) 1993-1999 Martin Stover, Marburg, Germany
*/
#ifndef _NWSHARE_H_
#define _NWSHARE_H_ 1
/* changed by: Ingmar Thiemann <ingmar@gefas.com> */
extern int share_file(mars_dev_t dev, mars_ino_t inode, int open_mode, int action);
extern int share_lock(mars_dev_t dev, mars_ino_t inode, int fd, int action,
int lock_flag, int l_start, int l_len, int timeout );
extern int share_unlock_all(mars_dev_t dev, mars_ino_t inode, int fd);
extern int share_set_file_add_rm(int lock_flag, mars_dev_t dev, mars_ino_t inode);
extern int share_set_logrec_add_rm(int lock_flag, int timeout, int len, char *data);
extern int share_set_physrec_add_rm(int lock_flag, int fhandle, uint32 offset,
uint32 size, uint16 timeout);
extern int share_handle_lock_sets(int type, int lock_flag, int timeout);
#endif