Date: Mon, 3 Jun 1996 13:32:24 +0200 (MET DST) From: Nicolas.Souchu@prism.uvsq.fr (Nicolas SOUCHU) To: hackers@freebsd.org Subject: How to preempt the current process ? Message-ID: <199606031132.NAA00333@angrand.prism.uvsq.fr>
next in thread | raw e-mail | index | archive | help
An adapter that does not support interrupts must be polled. Then when data is not available, I want the current process to be preempted without sleeping, just scheduled (its state remains SRUN). Is that enough? : s = splhigh (); mi_switch (); curpriority = p->p_usrpri; splx (s); This is the sleep() code without queueing the process with state=SSLEEP. Secondly, what does mean : __asm__ ("":::"memory") ? This is the macro 'barrier()' in Linux. Thanks in advance... nicolas -- Nicolas.Souchu@prism.uvsq.fr Laboratoire PRiSM - Versailles, FRANCE http://www.prism.uvsq.fr/public/son
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606031132.NAA00333>