Esempio n. 1
0
int main_linkestablished(void *arg, CORELIB_LINK *link) {
	uint32		pkt[15];

	printf("[dconsole] link established link:%x\n", link);
	
	/* create console buffer for link */
	if (link->process == dirproc && link->thread == dirthread) {
		/* create our node in the directory system */
		dir_createnode(link, DIRECTORY_IF_VCONSOLE, "/dev/vconsole");
		signal(link->process, link->thread, link->rsignal);
		switchto(link->process, link->thread);
	}
	
	return 1;
}
Esempio n. 2
0
void disp(void)
{
        register PD     *p;

                                                /* take the process p   */
                                                /*   off the ready list */
                                                /*   root               */
        p = rlr;
        rlr = p->p_link;
#if DBG_GEMDISP
        kprintf("disp() to \"%8s\"\n", rlr->p_name);
#endif
                                                /* based on the state   */
                                                /*   of the process p   */
                                                /*   do something       */
        if (p->p_stat & WAITIN) 
          mwait_act(p);
        else
          disp_act(p);
                                                /* run through and      */
                                                /*   execute all the    */
                                                /*   fork processes     */
        do
        {
          if (fpcnt)
          {
            forker();
          }
          schedule();
        } while (fpcnt);


/* switchto() is a machine dependent routine which:
 *      1) restores machine state
 *      2) clear "indisp" semaphore
 *      3) returns to appropriate address
 *              so we'll never return from this
 */
        switchto(rlr->p_uda);
}
Esempio n. 3
0
void curr_switchto() {
	// printf("%s: %s, that's enough!", CURR_NAME, CURR_PNAME);
	switchto(CURR_PLAYER, get_index(CURR_ACTION));
	sprintf(msg, "%s was sent out!", CURR_PNAME); send();
	// printf("%s: Go, %s!", CURR_NAME, CURR_PNAME);
}