DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦fd6129d30⟧ TextFile

    Length: 597 (0x255)
    Types: TextFile
    Notes: UNIX file
    Names: »jl1.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »hr/src/jlib/jl1.c« 

TextFile

#include	<jlib.h>

extern	int	myfd;
extern	struct	jqueue	sendq,
			runq,
			s_replyq;

struct jqueue	wincrq;
int	l_wincr;		/* lock for wincr queue	*/

int	S_Create(wid, wcp)
int	wid;
WIN_CREATE *wcp;
{
	static WIN_CREATE _wc;

	S_wincr();
	_wc = *wcp;
	MsgReceiver = SMGR;
	MsgWid	  = wid;
	MsgCmd    = SM_CREATE;
	MsgPtr    = &_wc;
	sendmess();
	jdoze(&s_replyq);
	Msg = runq.jq_head->j_m;
	S_fwincr();
	if(MsgWid < 0)
		warn("S_Create: wid error=%d", MsgWid);
	return MsgWid;
}
 

S_wincr()
{
	if ( l_wincr )
		jdoze( &wincrq );
	l_wincr = 1;
}

S_fwincr()
{
	l_wincr = 0;
	jalert( &wincrq );
}