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

Function ulp_context_initialized

dpdk/drivers/net/bnxt/tf_ulp/bnxt_ulp.c:1318–1331  ·  view source on GitHub ↗

* Initialize the state of an ULP session. * If the state of an ULP session is not initialized, set it's state to * initialized. If the state is already initialized, do nothing. */

Source from the content-addressed store, hash-verified

1316 * initialized. If the state is already initialized, do nothing.
1317 */
1318static void
1319ulp_context_initialized(struct bnxt_ulp_session_state *session, bool *init)
1320{
1321 pthread_mutex_lock(&session->bnxt_ulp_mutex);
1322
1323 if (!session->bnxt_ulp_init) {
1324 session->bnxt_ulp_init = true;
1325 *init = false;
1326 } else {
1327 *init = true;
1328 }
1329
1330 pthread_mutex_unlock(&session->bnxt_ulp_mutex);
1331}
1332
1333/*
1334 * Check if an ULP session is already allocated for a specific PCI

Callers 1

ulp_session_initFunction · 0.85

Calls 2

pthread_mutex_lockFunction · 0.85
pthread_mutex_unlockFunction · 0.85

Tested by

no test coverage detected