Utility functions for reference counting.

This commit is contained in:
Ian Gulliver
2016-03-02 19:20:25 -08:00
parent 20bc50795d
commit 14be11de79
6 changed files with 19 additions and 8 deletions

View File

@@ -31,3 +31,11 @@ bool flow_new(int fd, struct flow *flow, void *passthrough) {
flow->new(fd, passthrough, NULL);
return true;
}
void flow_ref_inc(struct flow *flow) {
(*flow->ref_count)++;
}
void flow_ref_dec(struct flow *flow) {
(*flow->ref_count)--;
}