* 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. */
| 1316 | * initialized. If the state is already initialized, do nothing. |
| 1317 | */ |
| 1318 | static void |
| 1319 | ulp_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 |
no test coverage detected