.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "INSERT_RESOURCE" "9" "09 October 2005" "" ""
.SH NAME
insert_resource \- Inserts a resource in the resource tree
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int insert_resource (struct resource * \fIparent\fB, struct resource * \fInew\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIparent\fB\fR
parent of the new resource
.TP
\fB\fInew\fB\fR
new resource to insert
.SH "DESCRIPTION"
.PP
Returns 0 on success, -EBUSY if the resource can't be inserted.
.PP
This function is equivalent of request_resource when no conflict
happens. If a conflict happens, and the conflicting resources
entirely fit within the range of the new resource, then the new
resource is inserted and the conflicting resources become childs of
the new resource. Otherwise the new resource becomes the child of
the conflicting resource