I used to think referencing the uses of the EDR-DOS sharer jump table with those of lMS-DOS may prove fruitful because these tables could be similar in their semantics. However, I found that there is no simple correspondence between the two systems.
https://hg.pushbx.org/ecm/edrdos/file/4cda0b9af813/drdos/fdos.mac#l163 lists 12 entrypoints actually used, albeit there's 15 defined in the table.
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/DOS/msconst.nas#l167 lists 14 used and 1 unused (first one, at index 0). They are named as follows:
PUBLIC JShare
EVEN
JShare LABEL DWORD
DW OFFSET badcallentry, BIOCODE
DW OFFSET okcallentry, BIOCODE ; 1 MFT_enter
DW OFFSET okcallentry, BIOCODE ; 2 MFTClose
DW OFFSET badcallentry, BIOCODE ; 3 MFTclU
DW OFFSET badcallentry, BIOCODE ; 4 MFTCloseP
DW OFFSET badcallentry, BIOCODE ; 5 MFTCloN
DW OFFSET badcallentry, BIOCODE ; 6 set_block
DW OFFSET badcallentry, BIOCODE ; 7 clr_block
DW OFFSET okcallentry, BIOCODE ; 8 chk_block
DW OFFSET badcallentry, BIOCODE ; 9 MFT_get
DW OFFSET badcallentry, BIOCODE ; 10 ShSave
DW OFFSET badcallentry, BIOCODE ; 11 ShChk
DW OFFSET okcallentry , BIOCODE ; 12 ShCol
DW OFFSET badcallentry, BIOCODE ; 13 ShCloseFile
DW OFFSET badcallentry, BIOCODE ; 14 ShSU
Expanding the cryptic names:
DW OFFSET okcallentry, BIOCODE ; 1 MFT_enter
Enter a file (SFT just opened) into the Master File Table (MFT), either creating a new MFT entry or linking an existing one to this SFT. It also "checks for a file sharing conflict", and will return an error if the open must be rejected.
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l180
DW OFFSET okcallentry, BIOCODE ; 2 MFTClose
Close an SFT, unlink it from its MFT and free the MFT if this was the last user.
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l279
DW OFFSET badcallentry, BIOCODE ; 3 MFTclU
Close all files for a given user id
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l367 This uses BCS "Bulk Close SFTs". BCS uses CPS "Close Process SFTs" which contains the PSP walker
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l903
Aka 21.5D03
https://fd.lod.bz/rbil/interrup/dos_kernel/215d03.html
The "user id" is the machine number at
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/INC/const2.nas#l146 called "network machine number for sharing/network (0000h = us)" in the interrupt list
https://fd.lod.bz/rbil/interrup/dos_kernel/215d06.html#3063 (MSW apparently uses this for a VM id.)
DW OFFSET badcallentry, BIOCODE ; 4 MFTCloseP
Close all files for a given user id and process id combination
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l407 Also uses Bulk Close SFTs. Aka 21.5D04
https://fd.lod.bz/rbil/interrup/dos_kernel/215d04.html
DW OFFSET badcallentry, BIOCODE ; 5 MFTCloN
Close file by name.
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l450 This uses CPS (Close Process SFTs). Aka 21.5D02
https://fd.lod.bz/rbil/interrup/dos_kernel/215d02.html
DW OFFSET badcallentry, BIOCODE ; 6 set_block
Probably "lock file region"
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l536
DW OFFSET badcallentry, BIOCODE ; 7 clr_block
Probably "unlock file region"
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l790
DW OFFSET okcallentry, BIOCODE ; 8 chk_block
Check for lock during file access
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l1584
The lock related functions contain lots of commented code. And apparently the sharer doesn't distinguish read locks from read/write locks in this version. I seem to recall that MS-DOS v5 does do that according to the interrupt list.
This is confusing to me because 21.5C doesn't accept a lock type according to the interrupt list:
https://fd.lod.bz/rbil/interrup/dos_kernel/215c.html
But the 21.52 tables list an MS-DOS v5 lock type:
https://fd.lod.bz/rbil/interrup/dos_kernel/2152.html#table-01638
DW OFFSET badcallentry, BIOCODE ; 9 MFT_get
Query MFT for an opened SFT from indices
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare.nas#l1756 aka 21.5D05
https://fd.lod.bz/rbil/interrup/dos_kernel/215d05.html
DW OFFSET badcallentry, BIOCODE ; 10 ShSave
"save information from SFT into an FCB"
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l1111
DW OFFSET badcallentry, BIOCODE ; 11 ShChk
"check a fcb for share related information"
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l1071
DW OFFSET okcallentry , BIOCODE ; 12 ShCol
"collapse identical handle SFTs in mode 70 only"
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l1147
DW OFFSET badcallentry, BIOCODE ; 13 ShCloseFile
Close file from name if opened in compat mode, before REN or DEL
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l1267
This one interestingly doesn't return a status in any useful way. The sole caller at
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/DOS/delete.nas#l412 will construct a deny all SFT on the stack after calling ShCloseFile and try to open it with the sharer to make sure the deletion operation may proceed.
DW OFFSET badcallentry, BIOCODE ; 14 ShSU
SFT Update, broadcast a change in an SFT to other SFTs linked to the same file. This is the one most involved in cluster values and hence suspect for FAT32 extensions
https://hg.pushbx.org/ecm/msdos4/file/59ed725f4b3d/src/CMD/SHARE/gshare2.nas#l1374