PULSAR  1.0.0
Parallel Ultra Light Systolic Array Runtime
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
prt_packet.h
Go to the documentation of this file.
1 
11 #ifndef PRT_PACKET_H
12 #define PRT_PACKET_H
13 
14 #include "prt.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
24 typedef struct prt_packet_s {
25  void *data; // pointer to the data
26  int num_refs; // number of active references
27 } prt_packet_t;
28 
29 prt_packet_t *prt_packet_new(size_t data_size);
30 void prt_packet_release(prt_packet_t *packet);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif /* PRT_PACKET_H */
void prt_packet_release(prt_packet_t *packet)
Release a packet. Decrements the number of active references. Destroys the packet when the last refer...
Definition: prt_packet.c:44
VDP's data packet A packet of data transferred through VDP's channels.
Definition: prt_packet.h:24
void * data
Definition: prt_packet.h:25
prt_packet_t * prt_packet_new(size_t data_size)
packet constructor Sets the number of references to one.
Definition: prt_packet.c:23
struct prt_packet_s prt_packet_t
VDP's data packet A packet of data transferred through VDP's channels.