.\" 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 "ALLOC_HPSB_PACKET" "" "06 October 2005" "" "" .SH NAME alloc_hpsb_packet \- allocate new packet structure .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp struct hpsb_packet * alloc_hpsb_packet (size_t \fIdata_size\fB); \fR .SH "ARGUMENTS" .TP \fB\fIdata_size\fB\fR size of the data block to be allocated .SH "DESCRIPTION" .PP This function allocates, initializes and returns a new &struct hpsb_packet. It can be used in interrupt context. A header block is always included, its size is big enough to contain all possible 1394 headers. The data block is only allocated when \fIdata_size\fR is not zero. .PP For packets for which responses will be received the \fIdata_size\fR has to be big enough to contain the response's data block since no further allocation occurs at response matching time. .PP The packet's generation value will be set to the current generation number for ease of use. Remember to overwrite it with your own recorded generation number if you can not be sure that your code will not race with a bus reset. .SH "RETURN VALUE" .PP A pointer to a &struct hpsb_packet or NULL on allocation failure.