MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_timer_data_alloc

Function rte_timer_data_alloc

dpdk/lib/timer/rte_timer.c:87–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85} while (0)
86
87int
88rte_timer_data_alloc(uint32_t *id_ptr)
89{
90 int i;
91 struct rte_timer_data *data;
92
93 if (!rte_timer_subsystem_initialized)
94 return -ENOMEM;
95
96 for (i = 0; i < RTE_MAX_DATA_ELS; i++) {
97 data = &rte_timer_data_arr[i];
98 if (!(data->internal_flags & FL_ALLOCATED)) {
99 data->internal_flags |= FL_ALLOCATED;
100
101 if (id_ptr)
102 *id_ptr = i;
103
104 return 0;
105 }
106 }
107
108 return -ENOSPC;
109}
110
111int
112rte_timer_data_dealloc(uint32_t id)

Callers 2

swtim_initFunction · 0.85
test_timer_secondaryFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_timer_secondaryFunction · 0.68