Changeset 384c488 in mainline


Ignore:
Timestamp:
2008-11-21T14:38:18Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
741fd16
Parents:
1378b2b
Message:

Replace 'stop' in udebug_thread_t with 'go' for consistency with nomenclature.

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/udebug/udebug.h

    r1378b2b r384c488  
    185185
    186186        /** 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 */
    191191} udebug_thread_t;
    192192
  • kernel/generic/src/udebug/udebug.c

    r1378b2b r384c488  
    9696
    9797        ut->go_call = NULL;
    98         ut->stop = true;
     98        ut->go = false;
    9999        ut->stoppable = true;
    100100        ut->debug_active = false;
     
    199199                 */
    200200
    201                 if (THREAD->udebug.debug_active && THREAD->udebug.stop) {
     201                if (THREAD->udebug.debug_active == true &&
     202                    THREAD->udebug.go == false) {
    202203                        /*
    203204                         * Thread was requested to stop - answer go call
     
    240241
    241242        if (THREAD->udebug.debug_active &&
    242             THREAD->udebug.stop == true) {
     243            THREAD->udebug.go == false) {
    243244                TASK->udebug.begin_call = NULL;
    244245                mutex_unlock(&THREAD->udebug.lock);
     
    324325        /* Must only generate events when in debugging session and is go. */
    325326        if (THREAD->udebug.debug_active != true ||
    326             THREAD->udebug.stop == true ||
     327            THREAD->udebug.go == false ||
    327328            (TASK->udebug.evmask & UDEBUG_EVMASK(etype)) == 0) {
    328329                mutex_unlock(&THREAD->udebug.lock);
     
    349350
    350351        /*
    351          * Make sure udebug.stop is true when going to sleep
     352         * Make sure udebug.go is false when going to sleep
    352353         * in case we get woken up by DEBUG_END. (At which
    353354         * point it must be back to the initial true value).
    354355         */
    355         THREAD->udebug.stop = true;
     356        THREAD->udebug.go = false;
    356357        THREAD->udebug.cur_event = etype;
    357358
     
    388389        /* Must only generate events when in debugging session */
    389390        if (THREAD->udebug.debug_active != true) {
    390                 LOG("- debug_active: %s, udebug.stop: %s\n",
     391                LOG("- debug_active: %s, udebug.go: %s\n",
    391392                        THREAD->udebug.debug_active ? "yes(+)" : "no(-)",
    392                         THREAD->udebug.stop ? "yes(-)" : "no(+)");
     393                        THREAD->udebug.go ? "yes(-)" : "no(+)");
    393394                mutex_unlock(&THREAD->udebug.lock);
    394395                mutex_unlock(&TASK->udebug.lock);
     
    405406
    406407        /*
    407          * Make sure udebug.stop is true when going to sleep
     408         * Make sure udebug.go is false when going to sleep
    408409         * in case we get woken up by DEBUG_END. (At which
    409410         * point it must be back to the initial true value).
    410411         */
    411         THREAD->udebug.stop = true;
     412        THREAD->udebug.go = false;
    412413        THREAD->udebug.cur_event = UDEBUG_EVENT_THREAD_B;
    413414
     
    442443        /* Must only generate events when in debugging session. */
    443444        if (THREAD->udebug.debug_active != true) {
    444 /*              printf("- debug_active: %s, udebug.stop: %s\n",
     445/*              printf("- debug_active: %s, udebug.go: %s\n",
    445446                        THREAD->udebug.debug_active ? "yes(+)" : "no(-)",
    446                         THREAD->udebug.stop ? "yes(-)" : "no(+)");*/
     447                        THREAD->udebug.go ? "yes(-)" : "no(+)");*/
    447448                mutex_unlock(&THREAD->udebug.lock);
    448449                mutex_unlock(&TASK->udebug.lock);
     
    460461        THREAD->udebug.debug_active = false;
    461462        THREAD->udebug.cur_event = 0;           /* none */
    462         THREAD->udebug.stop = true;     /* set to initial value */
     463        THREAD->udebug.go = false;      /* set to initial value */
    463464
    464465        ipc_answer(&TASK->answerbox, call);
     
    520521
    521522                        /* Is the thread still go? */
    522                         if (t->udebug.stop == false) {
     523                        if (t->udebug.go == true) {
    523524                                /*
    524525                                * Yes, so clear go. As debug_active == false,
    525526                                 * this doesn't affect anything.
    526527                                 */
    527                                 t->udebug.stop = true; 
     528                                t->udebug.go = false;   
    528529
    529530                                /* Answer GO call */
  • kernel/generic/src/udebug/udebug_ops.c

    r1378b2b r384c488  
    143143        mutex_unlock(&TASK->udebug.lock);
    144144
    145         if (!t->udebug.stop != being_go) {
     145        if (t->udebug.go != being_go) {
    146146                /* Not in debugging session or undesired GO state. */
    147147                mutex_unlock(&t->udebug.lock);
     
    292292
    293293        t->udebug.go_call = call;
    294         t->udebug.stop = false;
     294        t->udebug.go = true;
    295295        t->udebug.cur_event = 0;        /* none */
    296296
     
    330330
    331331        /* 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) {
    335335                /* Answer will be sent when the thread becomes stoppable. */
    336336                _thread_op_end(t);
Note: See TracChangeset for help on using the changeset viewer.