alloc

syntax

union SIGNAL *alloc (OSBUFSIZE size, SIGSELECT signo);

description

allocates a signal buffer of the specified size from the pool available to the caller's block. the specified signo (signal number) is entered in the first location in the new buffer.
the maximux buffer size available is dictated by sizeof(OSBUFSIZE). this means that is sizeof(OSBUFSIZE) returns 2 then the maximum available buffer size is 65536 (2(sizeof(OSBUFSIZE)*8)).
this rule may sometimes fail since the maximum buffer size may have been set to a smaller value when the pool was created. the minimum buffer size is one byte.

parameters

  • size - the requested size of the buffer.
  • signo - the signal number, will be placed in the allocated buffer.

returned value

returns a pointer to the new buffer.

restrictions

the new buffer is owned by the calling process. a new owner can be entered only by using one of the system calls that operates on the buffer. it is basically illegal to pass control of a buffer to another process in any other way since buffers may be lost in case of premature process termination.
(skipped something about the restore system call)
(skipped something about get_pcb)

see also

You: Guest
You permissions: Read
en/elflib/functions/alloc.txt · Last modified: 30/03/2015 00:00 (external edit)
Total pages: 365
RSS on Mobilefree Wiki www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Valid XHTML 1.0
© 2005-2018 supertrubka.org