implementation module ProcessSerialNumber;

// winos
import
	StdEnv;
	
from DynamicLink import KillClient;
//1.3
from ioTypes import IOState;
//3.1
/*2.0
from ioTypes import ::IOState;
0.2*/
	
:: ProcessSerialNumber = {
		client_id	:: !Int
	};


DefaultProcessSerialNumber :: !ProcessSerialNumber;
DefaultProcessSerialNumber	= { client_id = 0};
	
CreateProcessSerialNumber :: !Int -> !ProcessSerialNumber;
CreateProcessSerialNumber client_id
	= { client_id = client_id};
	
GetOSProcessSerialNumber :: !ProcessSerialNumber -> !Int;
GetOSProcessSerialNumber {client_id}
	= client_id;
	
instance == ProcessSerialNumber
where {
	(==) {client_id=client_id1} {client_id=client_id2}
		= client_id1 == client_id2;
};

KillClient2 :: !ProcessSerialNumber !(IOState s) ->  !(IOState s);
KillClient2 {client_id} io
	= abort "KillClient2";
/*
	| KillClient client_id
		= io;
		= io;
*/