Changeset 384c488 in mainline
- Timestamp:
- 2008-11-21T14:38:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 741fd16
- Parents:
- 1378b2b
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/udebug/udebug.h
r1378b2b r384c488 185 185 186 186 /** What type of event are we stopped in or 0 if none. */ 187 udebug_event_t cur_event; 188 bool stop;189 bool stoppable; 190 bool debug_active; /**< in a debugging session */187 udebug_event_t cur_event; 188 bool go; /**< thread is GO */ 189 bool stoppable; /**< thread is stoppable */ 190 bool debug_active; /**< thread is in a debugging session */ 191 191 } udebug_thread_t; 192 192 -
kernel/generic/src/udebug/udebug.c
r1378b2b r384c488 96 96 97 97 ut->go_call = NULL; 98 ut-> stop = true;98 ut->go = false; 99 99 ut->stoppable = true; 100 100 ut->debug_active = false; … … 199 199 */ 200 200 201 if (THREAD->udebug.debug_active && THREAD->udebug.stop) { 201 if (THREAD->udebug.debug_active == true && 202 THREAD->udebug.go == false) { 202 203 /* 203 204 * Thread was requested to stop - answer go call … … 240 241 241 242 if (THREAD->udebug.debug_active && 242 THREAD->udebug. stop == true) {243 THREAD->udebug.go == false) { 243 244 TASK->udebug.begin_call = NULL; 244 245 mutex_unlock(&THREAD->udebug.lock); … … 324 325 /* Must only generate events when in debugging session and is go. */ 325 326 if (THREAD->udebug.debug_active != true || 326 THREAD->udebug. stop == true ||327 THREAD->udebug.go == false || 327 328 (TASK->udebug.evmask & UDEBUG_EVMASK(etype)) == 0) { 328 329 mutex_unlock(&THREAD->udebug.lock); … … 349 350 350 351 /* 351 * Make sure udebug. stop is true when going to sleep352 * Make sure udebug.go is false when going to sleep 352 353 * in case we get woken up by DEBUG_END. (At which 353 354 * point it must be back to the initial true value). 354 355 */ 355 THREAD->udebug. stop = true;356 THREAD->udebug.go = false; 356 357 THREAD->udebug.cur_event = etype; 357 358 … … 388 389 /* Must only generate events when in debugging session */ 389 390 if (THREAD->udebug.debug_active != true) { 390 LOG("- debug_active: %s, udebug. stop: %s\n",391 LOG("- debug_active: %s, udebug.go: %s\n", 391 392 THREAD->udebug.debug_active ? "yes(+)" : "no(-)", 392 THREAD->udebug. stop? "yes(-)" : "no(+)");393 THREAD->udebug.go ? "yes(-)" : "no(+)"); 393 394 mutex_unlock(&THREAD->udebug.lock); 394 395 mutex_unlock(&TASK->udebug.lock); … … 405 406 406 407 /* 407 * Make sure udebug. stop is true when going to sleep408 * Make sure udebug.go is false when going to sleep 408 409 * in case we get woken up by DEBUG_END. (At which 409 410 * point it must be back to the initial true value). 410 411 */ 411 THREAD->udebug. stop = true;412 THREAD->udebug.go = false; 412 413 THREAD->udebug.cur_event = UDEBUG_EVENT_THREAD_B; 413 414 … … 442 443 /* Must only generate events when in debugging session. */ 443 444 if (THREAD->udebug.debug_active != true) { 444 /* printf("- debug_active: %s, udebug. stop: %s\n",445 /* printf("- debug_active: %s, udebug.go: %s\n", 445 446 THREAD->udebug.debug_active ? "yes(+)" : "no(-)", 446 THREAD->udebug. stop? "yes(-)" : "no(+)");*/447 THREAD->udebug.go ? "yes(-)" : "no(+)");*/ 447 448 mutex_unlock(&THREAD->udebug.lock); 448 449 mutex_unlock(&TASK->udebug.lock); … … 460 461 THREAD->udebug.debug_active = false; 461 462 THREAD->udebug.cur_event = 0; /* none */ 462 THREAD->udebug. stop = true; /* set to initial value */463 THREAD->udebug.go = false; /* set to initial value */ 463 464 464 465 ipc_answer(&TASK->answerbox, call); … … 520 521 521 522 /* Is the thread still go? */ 522 if (t->udebug. stop == false) {523 if (t->udebug.go == true) { 523 524 /* 524 525 * Yes, so clear go. As debug_active == false, 525 526 * this doesn't affect anything. 526 527 */ 527 t->udebug. stop = true;528 t->udebug.go = false; 528 529 529 530 /* Answer GO call */ -
kernel/generic/src/udebug/udebug_ops.c
r1378b2b r384c488 143 143 mutex_unlock(&TASK->udebug.lock); 144 144 145 if ( !t->udebug.stop!= being_go) {145 if (t->udebug.go != being_go) { 146 146 /* Not in debugging session or undesired GO state. */ 147 147 mutex_unlock(&t->udebug.lock); … … 292 292 293 293 t->udebug.go_call = call; 294 t->udebug. stop = false;294 t->udebug.go = true; 295 295 t->udebug.cur_event = 0; /* none */ 296 296 … … 330 330 331 331 /* Take GO away from the thread. */ 332 t->udebug. stop = true;333 334 if ( !t->udebug.stoppable) {332 t->udebug.go = false; 333 334 if (t->udebug.stoppable != true) { 335 335 /* Answer will be sent when the thread becomes stoppable. */ 336 336 _thread_op_end(t);
Note:
See TracChangeset
for help on using the changeset viewer.