Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

clear_wait(9r) [osf1 man page]

clear_wait(9r)															    clear_wait(9r)

NAME
clear_wait - General: Clears the wait condition SYNOPSIS
void clear_wait( thread_t thread, int result, boolean_t interrupt_only ); ARGUMENTS
Specifies a pointer to the thread Specifies the outcome of the wait. You can pass one of the following values: This is a normal wakeup. The timeout period expired. The clear_wait routine interrupted the wakeup. Specifies a Boolean value that indicates how the clear_wait routine clears the wait condition. You can pass one of the following values: Clears the wait condition only if the kernel thread is waiting in an interruptible state. Clears the wait condition under any circumstances. DESCRIPTION
The clear_wait routine clears the wait condition for the specified kernel thread and starts executing the kernel thread, if appropriate. If the kernel thread is interruptible and is still waiting for the event, clear_wait sets the kernel thread state to TH_RUN and places it on the run queue. RETURN VALUES
None SEE ALSO
Routines: assert_wait_mesg(9r), mpsleep(9r), thread_block(9r), thread_wakeup(9r), thread_wakeup_one(9r) clear_wait(9r)

Check Out this Related Man Page

kernel_thread_w_arg(9r) 												   kernel_thread_w_arg(9r)

NAME
kernel_thread_w_arg - General: Starts a kernel thread with a calling argument passed in SYNOPSIS
thread_t kernel_thread_w_arg( task_t task, void (*start) (void), void* argument ); ARGUMENTS
Specifies a pointer to a task structure. This pointer identifies the task in which the kernel_thread_w_arg routine starts the newly cre- ated kernel thread. Specifies a pointer to a routine that is the entry point for the newly created kernel thread. Specifies the argument that kernel_thread_w_arg passes to the entry point specified in start. DESCRIPTION
The kernel_thread_w_arg routine creates and starts a kernel thread in the specified task at the specified entry point with a specified argument. The kernel_thread_w_arg routine passes the specified argument to the newly created kernel thread. The kernel_thread_w_arg rou- tine creates and starts a kernel thread with timeshare scheduling. A kernel thread created with timeshare scheduling means that its prior- ity degrades if it consumes an inordinate amount of CPU resources. A kernel module should call kernel_thread_w_arg only for long-running tasks. A kernel module should always attach a kernel thread to the ``first task.'' NOTES
This routine is actually a convenience wrapper for the thread_create routine (which creates the kernel thread) and the thread_start routine (which starts the newly created kernel thread). The kernel_thread_w_arg routine behaves identically to kernel_isrthread except that with kernel_thread_w_arg you can pass an argument to the entry point for the newly created kernel thread. RETURN VALUES
Upon successful completion, kernel_thread_w_arg returns a pointer to the thread structure associated with the kernel thread started at the specified entry point. Kernel modules can use this pointer as a handle to a specific kernel thread in calls to other kernel threads-related routines. SEE ALSO
Routines: kernel_isrthread(9r), thread_create(9r), thread_start(9r) Data Structures: task(9s), thread(9s) kernel_thread_w_arg(9r)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Log files

Hello, I want to delete a logfile but not all the message in the log; example, wait wait wait wait hello hello hello hello so in the logfile i will delete only the text hello and the wait not. (4 Replies)
Discussion started by: mp3catcer1
4 Replies

2. Shell Programming and Scripting

wait ${!}

In one of the shell script (Where abinitio graph is called), the last line is wait ${!}. What does this wait ${!} mean ??? (2 Replies)
Discussion started by: risshanth
2 Replies

3. Shell Programming and Scripting

race condition with wait() function

Hi, I'm currently writing a bash script, that starts multiple threads: ____________________ #!/bin/bash loop=0 while((loop!=10)) do thread & ((loop++)) done #wait for all sub-processes (thread) to finish wait ___________________ Now I want to know, what happens, if a... (2 Replies)
Discussion started by: tho99
2 Replies

4. Programming

how to wake up a thread that blocking at epoll_wait?

I have two threads: one maintains a thread-safe message queue (handle this queue at the beginning of every loop) and deals with tcp connections, the other one posts message to the former one. the problem is, while the former one was blocking at epoll_wait, it's not sure that how long until the... (0 Replies)
Discussion started by: cometeor
0 Replies

5. AIX

%wait nmon CPU-UTILISATION

Hi, I collect statistics with nmon. I'm very suprised about % wait of processor. Number Of Processors: 4 Processor Clock Speed: 4204 MHz Do U have an idea about % wait ? │ 0----------25-----------50----------75----------100 ... (1 Reply)
Discussion started by: tagger
1 Replies

6. Shell Programming and Scripting

Breaking "while read" also breaks the parent process

Hi, I'm a bit confused. Maybe some master can explain to me what is happening. I have a program that starts issuing output about himself loading. I want to run it in another thread but I want to wait untill it's fully loaded. Program sample: $ cat myprogram echo "loading" echo "almost... (3 Replies)
Discussion started by: chebarbudo
3 Replies

7. Shell Programming and Scripting

wait example

Hi Gurus, Some questions regarding wait. I have tried searching in this forum for threads on wait but not completely got what I am looking for. Background: One script (.sh) that starts/calls a reference to an application's executable and submits a batch job to it. Objective is to wait... (2 Replies)
Discussion started by: rsheikh
2 Replies

8. Shell Programming and Scripting

Need to pass value to if condition

Hi Team, I want to run multiple sql select command after loggin to sqlplus and need to pass the value to variable to check the condition. Please let me know how to do this. ---------------------------- When I am running the below script I am getting the below error SP2-0734: unknown command... (1 Reply)
Discussion started by: Mukharam Khan
1 Replies

9. Shell Programming and Scripting

Problems with if condition

My code: server="icapp1 icapp6 ihapp1 ihapp6 icapp2 icapp3 icapp4 ihapp2 ihapp3 ihapp4 icapp5 ihapp5 " printf "\nCheck server: " read input if then and the problem is "$input == $server" is wrong :(:(:(. Can someone fix this for me. I don't want to use || for all these servers. Thanks (18 Replies)
Discussion started by: bobochacha29
18 Replies

10. Shell Programming and Scripting

If condition giving syntax error. Need help.

Hi, I have an if condition on executing it is giving syntax error as below: -------------------------------------------------------------------------------------- line 61: syntax error in conditional expression ./play_test.sh: line 61: syntax error near `]' ./play_test.sh: line 61: ` if... (2 Replies)
Discussion started by: ramki067
2 Replies

11. Post Here to Contact Site Administrators and Moderators

Use of Cartoonsin Cartoons for Geeks

I am an educator teaching online courses for a state educational college. I came across the cartoons in the "Cartoons for Geeks" thread and I was wondering if I might use some of them as attention grabbers in my UNIX/Linux course? (2 Replies)
Discussion started by: Margaret P
2 Replies