Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

yield(9) [centos man page]

YIELD(9)							   Driver Basics							  YIELD(9)

NAME
yield - yield the current processor to other threads. SYNOPSIS
void __sched yield(void); ARGUMENTS
void no arguments DESCRIPTION
Do not ever use this function, there's a 99% chance you're doing it wrong. The scheduler is at all times free to pick the calling task as the most eligible task to run, if removing the yield call from your code breaks it, its already broken. TYPICAL BROKEN USAGE IS
while (!event) yield; where one assumes that yield will let 'the other' process run that will make event true. If the current task is a SCHED_FIFO task that will never happen. Never use yield as a progress guarantee!! If you want to use yield to wait for something, use wait_event. If you want to use yield to be 'nice' for others, use cond_resched. If you still want to use yield, do not! COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 YIELD(9)
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