Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

yield(9) [netbsd man page]

PREEMPT(9)						   BSD Kernel Developer's Manual						PREEMPT(9)

NAME
preempt, yield -- general preempt and yield functions SYNOPSIS
#include <sys/sched.h> void preempt(void); #include <sys/proc.h> void yield(void); DESCRIPTION
The preempt() function puts the current LWP back on the system run queue and performs an involuntary context switch. The yield() function is mostly same as preempt(), except that it performs a voluntary context switch. These functions drop the kernel lock before switching and re-acquire it before returning. BSD
July 3, 2007 BSD

Check Out this Related Man Page

USERRET(9)						   BSD Kernel Developer's Manual						USERRET(9)

NAME
userret -- return path to user-mode execution SYNOPSIS
#include <sys/lwp.h> #include <sys/sched.h> void userret(struct lwp *l); DESCRIPTION
The userret() function is executed after processing a trap (e.g., a system call or interrupt) before returning to user-mode execution. The implementation is machine dependent and is never invoked from machine-independent code. The function prototype for each architecture may be different to the prototype above, however the functionally provided by the userret() function on each architecture is essentially the same. Specifically, the userret() function performs the following procedure: o Detect a change in the signal disposition of the current process and invoke postsig(9) to post the signal to the process. This may occur when the outcome of the trap or syscall posted a signal to the process (e.g., invalid instruction trap). o Check the want_resched flag to see if the scheduler requires the current process to be preempted by invoking preempt(9) (see cpu_need_resched(9)). This may occur if the clock interrupt causes the scheduler to determine that the current process has com- pleted its time slice. o Update the scheduler state. SEE ALSO
cpu_need_resched(9), postsig(9), preempt(9), scheduler(9) BSD
December 20, 2005 BSD
Man Page

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Puzzle: file name grepped from text file yields "no such file"

Dear all, In a bash script, I grep a filename from an UTF8 encoded file: LIST=`grep ^source $FILE | tr "\t" " " | cut -d " " -f 2 | sed -e 's,~,\$HOME,g'` The result is # echo $LIST $HOME/.mail_aliases_seminaire_MMMG Then I try to access it: #ls $LIST ls: cannot access... (3 Replies)
Discussion started by: josce
3 Replies

2. Shell Programming and Scripting

exec perl in expect script yields "invalid command"

I'm trying to execute something like this: exec perl -i -pe 's/\015/\012/g' '${file}' in my expect script and I get: error "invalid command name \"perl\". however, if I run perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt" directly in my terminal, it runs fine. I'm an... (4 Replies)
Discussion started by: dpouliot
4 Replies

3. Forum Support Area for Unregistered Users & Account Problems

UNIX.com links from Google yield invalid thread error

If one enters a Google search query like site:unix.com mysql php and clicks on the resulting link, one gets the message below: vBulletin Message No Thread specified. If you followed a valid link, please notify the administrator (2 Replies)
Discussion started by: Unregistered
2 Replies

4. UNIX for Dummies Questions & Answers

Cp via NFS vs. scp yields unexpected difference

I have two Linux machines, Linux1 and Linux2. They both have two NFS mounts. We'll call them /scratch1 and /scratch2. And they both reside on the same NetApp filer. If I copy a 512Mb file from /scratch1 to /scratch2 while logged on Linux1 it takes 40s. However if I scp this file from... (1 Reply)
Discussion started by: crimso
1 Replies

5. Shell Programming and Scripting

awk output yields error: awk:can't open job_name (Autosys)

Good evening, Im newbie at unix specially with awk From an scheduler program called Autosys i want to extract some data reading an inputfile that comprises jobs names, then formating the output to columns for example 1. This is the inputfile: $ more MapaRep.txt ds_extra_nikira_usuarios... (18 Replies)
Discussion started by: alexcol
18 Replies

6. UNIX for Beginners Questions & Answers

Simple conditional yields too many responses

In this script: #!/bin/bash # bird read -p "Enter name of a bird " REPLY=$REPLY birdname="duck sparrow hawk" for i in $birdname do if ] then echo "Yes, that is a bird." else echo "That is not a bird." fi done I get... (9 Replies)
Discussion started by: Xubuntu56
9 Replies