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

⟦3d8da3fb0⟧ TextFile

    Length: 888 (0x378)
    Types: TextFile
    Notes: UNIX file
    Names: »jsend.c«

Derivation

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

TextFile

#include	<jlib.h>

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

/*
** NOTE:
**	managers upon receipt of a reply from screen mgr are expected to do:
**	s_replyq.jq_head->j_m = m;      where m is the reply they received 
**					from screen manager.
**	jalert(&s_replyq);
** It is assumed by the sendmess that all the managers have
** declared and assigned 'myfd'. Also they have a 'struct jqueue sendq'
** for sendmess to jdoze on in case of EDBUSY or there are messages
** ahead in sendq not sent yet.
** Also note: a matching jalert(&sendq) in readmesg() has to be done, in 
** EDATTN: leg of readmesg().
*/
 
sendmess()
{
if ( MsgSender == WMGR+1 )
	croak("\007sendmess: msg to self, cmd %d\n", MsgCmd);
	if( not sendq.jq_head){
		if(ioctl( myfd, CIOSENDM, &Msg) == 0)
			return;
		if( errno != EDBUSY)
			croak("CIOSENDM errno=%d", errno);
	}
	jdoze(&sendq);
}