Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

trunc_page(9r) [osf1 man page]

trunc_page(9r)															    trunc_page(9r)

NAME
trunc_page - General: Truncates the specified address SYNOPSIS
#include <mach/vm_param.h> vm_offset_t trunc_page( vm_offset_t address ); ARGUMENTS
Specifies the address that is being truncated to a page boundary. DESCRIPTION
The trunc_page routine truncates the specified address to be aligned on a page boundary. This routine shields the driver writer from having to know the page size of the system, which could vary in different CPU architectures and on different CPU types within the same architec- ture. Typically, a device driver calls trunc_page in preparation for doing a DMA operation on a user's buffer. The value returned by this routine is used in the call to the vm_map_pageable routine. To use this routine, the driver writer must include the <mach/vm_param.h> header file in the driver. RETURN VALUES
The trunc_page routine returns an address truncated to a page boundary. SEE ALSO
Routines: current_task(9r), round_page(9r), vm_map_pageable(9r) trunc_page(9r)

Check Out this Related Man Page

wakeup(9r)																wakeup(9r)

NAME
wakeup - General: Wakes up all processes sleeping on a specified address SYNOPSIS
void wakeup( caddr_t channel ); ARGUMENTS
Specifies the address on which the wakeup is to be issued. DESCRIPTION
The wakeup routine wakes up all processes sleeping on the address specified by the channel argument. All processes sleeping on this address are awakened and made ready to be scheduled according to the priorities they specified when they went to sleep. It is possible that there are no processes sleeping on the channel at the time the wakeup is issued. This situation can occur for a variety of reasons and does not represent an error condition. The sleep and wakeup routines block and unblock a process. Generally, a device driver issues these routines on behalf of a process request- ing I/O while a transfer is in progress. That is, a process requesting I/O is put to sleep on an address associated with the request by the appropriate device driver routine. When the transfer has asynchronously completed, the device driver interrupt service routine issues a wakeup on the address associated with the completed request. This action makes the relevant process to be scheduled. The process resumes execution within the relevant device driver routine at the point immediately following the request to sleep. The driver, on behalf of the process, can then determine whether the condition for which it was sleeping (in this example, completion of an I/O request) has been removed. If so, it can continue on to complete the I/O request. Otherwise, the appropriate driver routine can decide to put the process back to sleep to await removal of the indicated condition. RETURN VALUES
None SEE ALSO
Routines: mpsleep(9r), sleep(9r) wakeup(9r)
Man Page

We Also Found This Discussion For You

1. What is on Your Mind?

Throw my Toys out of the Pram!

Hi Folks, Today hasn't been the best one of my career in IT. I've been a contractor for a major utility company for a number of years, on a number of seperate IT contracts mostly Unix. The company had 10 different flavours of unix and multiple different varsions of most of them. At the... (3 Replies)
Discussion started by: gull04
3 Replies