Subversion Repositories HelenOS

Rev

Rev 4731 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4731 Rev 4756
Line 54... Line 54...
54
/** Packet map page size.
54
/** Packet map page size.
55
 */
55
 */
56
#define PACKET_MAP_SIZE 100
56
#define PACKET_MAP_SIZE 100
57
 
57
 
58
/** Returns the packet map page index.
58
/** Returns the packet map page index.
59
 *  @param packet_id The packet identifier.
59
 *  @param[in] packet_id The packet identifier.
60
 */
60
 */
61
#define PACKET_MAP_PAGE( packet_id )    ((( packet_id ) - 1 ) / PACKET_MAP_SIZE )
61
#define PACKET_MAP_PAGE( packet_id )    ((( packet_id ) - 1 ) / PACKET_MAP_SIZE )
62
 
62
 
63
/** Returns the packet index in the corresponding packet map page.
63
/** Returns the packet index in the corresponding packet map page.
64
 *  @param packet_id The packet identifier.
64
 *  @param[in] packet_id The packet identifier.
65
 */
65
 */
66
#define PACKET_MAP_INDEX( packet_id )   ((( packet_id ) - 1 ) % PACKET_MAP_SIZE )
66
#define PACKET_MAP_INDEX( packet_id )   ((( packet_id ) - 1 ) % PACKET_MAP_SIZE )
67
 
67
 
68
/** Type definition of the packet map page.
68
/** Type definition of the packet map page.
69
 */
69
 */
Line 77... Line 77...
77
 *  @see generic_field.h
77
 *  @see generic_field.h
78
 */
78
 */
79
GENERIC_FIELD_DECLARE( gpm, packet_map_t );
79
GENERIC_FIELD_DECLARE( gpm, packet_map_t );
80
 
80
 
81
/** Releases the packet.
81
/** Releases the packet.
82
 *  @param packet The packet to be released. Input parameter.
82
 *  @param[in] packet The packet to be released.
83
 *  @returns EOK on success.
83
 *  @returns EOK on success.
84
 *  @returns EINVAL if the packet is not valid.
84
 *  @returns EINVAL if the packet is not valid.
85
 */
85
 */
86
int packet_destroy( packet_t packet );
86
int packet_destroy( packet_t packet );
87
 
87