Changeset f651e80 in mainline for kernel/generic/src


Ignore:
Timestamp:
2009-01-08T12:07:38Z (17 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7447572
Parents:
c571f42
Message:

Make newlines in panic messages consistent. Add periods at end of messages so that it is obvious whether they are printed entirely.

Location:
kernel/generic/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/adt/btree.c

    rc571f42 rf651e80  
    125125        if (!lnode) {
    126126                if (btree_search(t, key, &lnode)) {
    127                         panic("B-tree %p already contains key %" PRIu64 "\n", t, key);
     127                        panic("B-tree %p already contains key %" PRIu64 ".", t, key);
    128128                }
    129129        }
     
    225225        if (!lnode) {
    226226                if (!btree_search(t, key, &lnode)) {
    227                         panic("B-tree %p does not contain key %" PRIu64 "\n", t, key);
     227                        panic("B-tree %p does not contain key %" PRIu64 ".", t, key);
    228228                }
    229229        }
     
    525525                }
    526526        }
    527         panic("node %p does not contain key %" PRIu64 "\n", node, key);
     527        panic("Node %p does not contain key %" PRIu64 ".", node, key);
    528528}
    529529
     
    552552                }
    553553        }
    554         panic("node %p does not contain key %" PRIu64 "\n", node, key);
     554        panic("Node %p does not contain key %" PRIu64 ".", node, key);
    555555}
    556556
     
    694694                        return i - (int) (right != false);
    695695        }
    696         panic("node %p does not contain subtree %p\n", node, subtree);
     696        panic("Node %p does not contain subtree %p.", node, subtree);
    697697}
    698698
  • kernel/generic/src/adt/hash_table.c

    rc571f42 rf651e80  
    6262        h->entry = (link_t *) malloc(m * sizeof(link_t), 0);
    6363        if (!h->entry) {
    64                 panic("cannot allocate memory for hash table\n");
     64                panic("Cannot allocate memory for hash table.");
    6565        }
    6666        memsetb(h->entry, m * sizeof(link_t), 0);
  • kernel/generic/src/cpu/cpu.c

    rc571f42 rf651e80  
    6565                                        FRAME_ATOMIC);
    6666                if (!cpus)
    67                         panic("malloc/cpus");
     67                        panic("Cannot allocate CPU structures.");
    6868
    6969                /* initialize everything */
  • kernel/generic/src/interrupt/interrupt.c

    rc571f42 rf651e80  
    106106static void exc_undef(int n, istate_t *istate)
    107107{
    108         fault_if_from_uspace(istate, "Unhandled exception %d", n);
    109         panic("Unhandled exception %d", n);
     108        fault_if_from_uspace(istate, "Unhandled exception %d.", n);
     109        panic("Unhandled exception %d.", n);
    110110}
    111111
  • kernel/generic/src/main/kinit.c

    rc571f42 rf651e80  
    111111                        thread_ready(thread);
    112112                } else
    113                         panic("Unable to create kmp thread\n");
     113                        panic("Unable to create kmp thread.");
    114114                thread_join(thread);
    115115                thread_detach(thread);
  • kernel/generic/src/main/main.c

    rc571f42 rf651e80  
    270270        task_t *kernel = task_create(AS_KERNEL, "kernel");
    271271        if (!kernel)
    272                 panic("Can't create kernel task\n");
     272                panic("Cannot create kernel task.");
    273273       
    274274        /*
     
    278278                = thread_create(kinit, NULL, kernel, 0, "kinit", true);
    279279        if (!kinit_thread)
    280                 panic("Can't create kinit thread\n");
     280                panic("Cannot create kinit thread.");
    281281        LOG_EXEC(thread_ready(kinit_thread));
    282282       
  • kernel/generic/src/mm/as.c

    rc571f42 rf651e80  
    147147        AS_KERNEL = as_create(FLAG_AS_KERNEL);
    148148        if (!AS_KERNEL)
    149                 panic("Cannot create kernel address space\n");
     149                panic("Cannot create kernel address space.");
    150150       
    151151        /* Make sure the kernel address space
     
    445445                                        if (!used_space_remove(area, start_free,
    446446                                            c - i))
    447                                                 panic("Could not remove used "
    448                                                     "space.\n");
     447                                                panic("Cannot remove used "
     448                                                    "space.");
    449449                                } else {
    450450                                        /*
     
    453453                                         */
    454454                                        if (!used_space_remove(area, b, c))
    455                                                 panic("Could not remove used "
    456                                                     "space.\n");
     455                                                panic("Cannot remove used "
     456                                                    "space.");
    457457                                }
    458458                       
     
    16671667
    16681668        panic("Inconsistency detected while adding %" PRIc " pages of used "
    1669             "space at %p.\n", count, page);
     1669            "space at %p.", count, page);
    16701670}
    16711671
     
    18461846error:
    18471847        panic("Inconsistency detected while removing %" PRIc " pages of used "
    1848             "space from %p.\n", count, page);
     1848            "space from %p.", count, page);
    18491849}
    18501850
  • kernel/generic/src/mm/backend_anon.c

    rc571f42 rf651e80  
    153153        page_mapping_insert(AS, addr, frame, as_area_get_flags(area));
    154154        if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))
    155                 panic("Could not insert used space.\n");
     155                panic("Cannot insert used space.");
    156156               
    157157        return AS_PF_OK;
  • kernel/generic/src/mm/backend_elf.c

    rc571f42 rf651e80  
    130130                            as_area_get_flags(area));
    131131                        if (!used_space_insert(area, page, 1))
    132                                 panic("Could not insert used space.\n");
     132                                panic("Cannot insert used space.");
    133133                        mutex_unlock(&area->sh_info->lock);
    134134                        return AS_PF_OK;
     
    215215        page_mapping_insert(AS, addr, frame, as_area_get_flags(area));
    216216        if (!used_space_insert(area, page, 1))
    217                 panic("Could not insert used space.\n");
     217                panic("Cannot insert used space.");
    218218
    219219        return AS_PF_OK;
  • kernel/generic/src/mm/backend_phys.c

    rc571f42 rf651e80  
    7878            as_area_get_flags(area));
    7979        if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))
    80                 panic("Could not insert used space.\n");
     80                panic("Cannot insert used space.");
    8181
    8282        return AS_PF_OK;
  • kernel/generic/src/mm/tlb.c

    rc571f42 rf651e80  
    174174                        break;
    175175                default:
    176                         panic("unknown type (%d)\n", type);
     176                        panic("Unknown type (%d).", type);
    177177                        break;
    178178                }
  • kernel/generic/src/proc/scheduler.c

    rc571f42 rf651e80  
    452452                         * Entering state is unexpected.
    453453                         */
    454                         panic("tid%" PRIu64 ": unexpected state %s\n",
     454                        panic("tid%" PRIu64 ": unexpected state %s.",
    455455                            THREAD->tid, thread_states[THREAD->state]);
    456456                        break;
  • kernel/generic/src/proc/tasklet.c

    rc571f42 rf651e80  
    5252        tasklet_list = malloc(sizeof(tasklet_descriptor_t *) * config.cpu_count, 0);
    5353        if (!tasklet_list)
    54                 panic("Error initializing tasklets");
     54                panic("Error initializing tasklets.");
    5555       
    5656        for (i = 0; i < config.cpu_count; i++)
  • kernel/generic/src/synch/rwlock.c

    rc571f42 rf651e80  
    232232                        break;
    233233                case ESYNCH_OK_ATOMIC:
    234                         panic("_mutex_lock_timeout() == ESYNCH_OK_ATOMIC\n");
     234                        panic("_mutex_lock_timeout() == ESYNCH_OK_ATOMIC.");
    235235                        break;
    236236                default:
    237                         panic("invalid ESYNCH\n");
     237                        panic("Invalid ESYNCH.");
    238238                        break;
    239239                }
  • kernel/generic/src/sysinfo/sysinfo.c

    rc571f42 rf651e80  
    164164                }       
    165165        }
    166         panic("Not reached\n");
     166
     167        panic("Not reached.");
    167168        return NULL;
    168169}
  • kernel/generic/src/time/clock.c

    rc571f42 rf651e80  
    8080        faddr = frame_alloc(ONE_FRAME, FRAME_ATOMIC);
    8181        if (!faddr)
    82                 panic("Cannot allocate page for clock");
     82                panic("Cannot allocate page for clock.");
    8383       
    8484        uptime = (uptime_t *) PA2KA(faddr);
  • kernel/generic/src/time/timeout.c

    rc571f42 rf651e80  
    114114
    115115        if (t->cpu)
    116                 panic("t->cpu != 0");
     116                panic("Unexpected: t->cpu != 0.");
    117117
    118118        t->cpu = CPU;
Note: See TracChangeset for help on using the changeset viewer.