[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'amigados' (#aros)


Finds a segment on the resident list


Source position: amigados.pas line 2376

function FindSegment(

  const Name: STRPTR;

  const Seg: PSegment;

  System: LongBool





Name of Segment to find



Segment to start the search after



True for system segment. False for normal segments

Function result

The Segment found or nil


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:

system module, such as a filesystem or shell
resident shell command
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



Adds a resident segment to the resident list



Removes a resident segment from the resident list



Forbid task scheduling.

Documentation generated on: 2017-01-10