Lines Matching refs:current_state
1204 static uint32_t pmc_internal_reservation_next_state(uint32_t current_state, pmc_state_event_t event) {
1209 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1215 new_state = PMC_STATE_MODIFY(current_state, 0, 0, PMC_STATE_FLAGS_STOPPING);
1218 if (PMC_STATE_CONTEXT_COUNT(current_state) == 0) {
1219 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_CAN_RUN, 0, 0, 0);
1225 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1227 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STOP, 0, 0, 0);
1233 new_state = PMC_STATE_MODIFY(current_state, 0, PMC_STATE_FLAGS_STOPPING, 0);
1236 if (PMC_STATE_CONTEXT_COUNT(current_state) > 0) {
1237 new_state = PMC_STATE_MODIFY(current_state, 0, PMC_STATE_FLAGS_STOPPING, 0);
1243 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1245 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, 0, 0);
1255 new_state = PMC_STATE_MODIFY(current_state, 0, PMC_STATE_FLAGS_DEALLOCING, PMC_STATE_FLAGS_STOPPING);
1261 new_state = PMC_STATE_MODIFY(current_state, 0, PMC_STATE_FLAGS_DEALLOCING, 0);
1264 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, PMC_STATE_FLAGS_DEALLOCING, PMC_STATE_FLAGS_STOPPING);
1267 if (PMC_STATE_CONTEXT_COUNT(current_state) > 0) {
1268 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, PMC_STATE_FLAGS_DEALLOCING, 0);
1270 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, 0, 0);
1276 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1280 new_state = PMC_STATE_MODIFY(current_state, 0, PMC_STATE_FLAGS_INTERRUPTING | PMC_STATE_FLAGS_STOPPING, 0);
1285 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1287 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, 0, PMC_STATE_FLAGS_DEALLOCING);
1290 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STOP, 0, 0, PMC_STATE_FLAGS_STOPPING);
1293 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_CAN_RUN, 0, 0, 0);
1298 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1300 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_LOAD, 1, 0, 0);
1305 new_state = PMC_STATE_MODIFY(current_state, 1, 0, 0);
1308 if (PMC_STATE_CONTEXT_COUNT(current_state) > 0) {
1309 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_LOAD, 1, 0, 0);
1315 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1317 if (PMC_STATE_CONTEXT_COUNT(current_state) > 1) {
1318 new_state = PMC_STATE_MODIFY(current_state, -1, 0, PMC_STATE_FLAGS_DEALLOCING);
1320 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1328 if (PMC_STATE_CONTEXT_COUNT(current_state) > 1) {
1329 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1337 if (PMC_STATE_CONTEXT_COUNT(current_state) == 1) {
1338 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STORE, -1, 0, 0);
1340 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1345 if (PMC_STATE_CONTEXT_COUNT(current_state) == 1) {
1346 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_INTERRUPT, -1, 0, PMC_STATE_FLAGS_INTERRUPTING);
1348 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1352 if (PMC_STATE_CONTEXT_COUNT(current_state) == 1) {
1353 new_state = PMC_STATE_MODIFY(current_state, -1, 0, PMC_STATE_FLAGS_STOPPING);
1355 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1359 if (PMC_STATE_CONTEXT_COUNT(current_state) > 0) {
1360 if (PMC_STATE_CONTEXT_COUNT(current_state) == 1) {
1361 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_CAN_RUN, -1, 0, 0);
1363 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1372 if (PMC_STATE_CONTEXT_COUNT(current_state) > 0) {
1373 new_state = PMC_STATE_MODIFY(current_state, -1, 0, 0);
1379 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1384 if (PMC_STATE_CONTEXT_COUNT(current_state) > 1) {
1385 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_RUN, -1, 0, 0);
1387 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STORE, -1, 0, 0);
1391 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_RUN, 0, 0, 0);
1396 switch (current_state & ~(PMC_STATE_CONTEXT_COUNT_MASK)) {
1398 if (PMC_STATE_CONTEXT_COUNT(current_state) == 0) {
1399 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, 0, PMC_STATE_FLAGS_DEALLOCING);
1401 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_DEALLOC, 0, 0, 0);
1406 if (PMC_STATE_CONTEXT_COUNT(current_state) == 0) {
1407 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_INTERRUPT, 0, 0, PMC_STATE_FLAGS_INTERRUPTING);
1409 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STOP, 0, 0, 0);
1413 if (PMC_STATE_CONTEXT_COUNT(current_state) == 0) {
1414 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STOP, 0, 0, PMC_STATE_FLAGS_STOPPING);
1416 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_STOP, 0, 0, 0);
1420 if (PMC_STATE_CONTEXT_COUNT(current_state) == 0) {
1421 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_CAN_RUN, 0, 0, 0);
1423 new_state = PMC_STATE_MOVE(current_state, PMC_STATE_STATE_LOAD, 0, 0, 0);