Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#os4units]

FindSegment

Finds a segment on the resident list

Declaration

Source position: amigados.pas line 2571

function FindSegment(

  const Name: PChar;

  const Seg: PDosResidentSeg;

  Sys: LongInt

):PDosResidentSeg;

Arguments

Name

  

Name of Segment to find

Seg

  

Segment to start the search after

Function result

The Segment found or nil

Description

Finds a segment on the Dos resident list by name and type, starting at the segment after 'start', or at the beginning if start is nil. If system is zero, it will only return nodes with a seg_UC of 0 or more. It does not increment the seg_UC, and it does not do any locking of the list. You must Forbid() lock the list to use this call.

To use an entry you have found, you must: if the seg_UC is 0 or more, increment it, and decrement it (under Forbid()!) when you're done the the seglist.

The other values for seg_UC are:

-1
system module, such as a filesystem or shell
-2
resident shell command
-999
disabled internal command, ignore

Negative values should never be modified. All other negative values between 0 and -32767 are reserved to AmigaDos and should not be used.

See also

AddSegment

  

Adds a resident segment to the resident list

RemSegment

  

Removes a resident segment from the resident list

exec.Forbid

  

Forbid task scheduling.


Documentation generated on: 2021-07-30