Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/octopus/port/mux/muxdat.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#
# Multiplexed fs fids and qids handling, for octopus mux.
#
Muxdat: module {
	PATH: con "/dis/o/muxdat.dis";

	Qroot :	con Qid(big 0, 0, QTDIR);
	NOQID:	con big ~0;
	Empty:	con "/mnt/empty";
	
	Fid: adt {
		fid:		int;			# fid known by client
		fd:		ref FD;		# for real file, while open.
		broken:	int;			# true for broken fids
		omode:	int;
		qid:		Qid;			# qid reported to client
		path:		string;
	};

	init:	fn(s: Sys, e: Error, n: Names, args: list of string);
	renametree:	fn(path:string, nname: string);
	addqid:		fn(path:string): big;
	getqid:		fn(path:string): big;
	delqid:		fn(path:string);
	fixqid:		fn(path:string, uqid: Qid): Qid;
	addfid:		fn(fid: ref Fid): int;
	delfid:		fn(fid: ref Fid);
	getfid:		fn(fid: int): ref Fid;

	bindrootdir:	fn();
	rebind:		fn();
	maybebroken:	fn(estr: string);

	rootdir:	string;
	debug:	int;
	qgen:	int;
	brokenfs: int;

};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.