Home  /  Autodocs  /  exec.library

NAME

RemTail
remove the tail node from a list

SYNOPSIS

node = RemTail(list)
D0 A0

struct Node *RemTail(struct List *);

FUNCTION

Remove the last node from a list, and return a pointer to it. If the list is empty, return zero. Assembly programmers may prefer to use the REMTAIL macro from "exec/lists.i". The REMTAIL() macro from <exec/list_macros.h> is available for 'C' programmers.

WARNING

This function does not arbitrate for access to the list. The calling Task must be the owner of the involved list.

INPUTS

list
a pointer to the target list header

RESULT

node
the Node removed or zero when empty List

SEE ALSO

AddHead(), AddTail(), Enqueue(), Insert(), Remove(), RemHead(), RemTail()