Changeset 96b02eb9 in mainline for kernel/test


Ignore:
Timestamp:
2010-12-14T12:52:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

Location:
kernel/test
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/fpu/fpu1_ia64.c

    r554debd r96b02eb9  
    8585               
    8686                if ((int) (100000000 * e) != E_10e8) {
    87                         TPRINTF("tid%" PRIu64 ": e*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8);
     87                        TPRINTF("tid%" PRIu64 ": e*10e8=%zd should be %" PRIun "\n", THREAD->tid, (sysarg_t) (100000000 * e), (sysarg_t) E_10e8);
    8888                        atomic_inc(&threads_fault);
    8989                        break;
     
    118118               
    119119                if ((int) (1000000 * pi) != PI_10e8) {
    120                         TPRINTF("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100));
     120                        TPRINTF("tid%" PRIu64 ": pi*10e8=%zd should be %" PRIun "\n", THREAD->tid, (sysarg_t) (1000000 * pi), (sysarg_t) (PI_10e8 / 100));
    121121                        atomic_inc(&threads_fault);
    122122                        break;
  • kernel/test/fpu/fpu1_x86.c

    r554debd r96b02eb9  
    8383                if ((int) (100000000 * e) != E_10e8) {
    8484                        TPRINTF("tid%" PRIu64 ": e*10e8=%" PRIun " should be %" PRIun "\n",
    85                             THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8);
     85                            THREAD->tid, (sysarg_t) (100000000 * e), (sysarg_t) E_10e8);
    8686                        atomic_inc(&threads_fault);
    8787                        break;
     
    117117                if ((int) (100000000 * pi) != PI_10e8) {
    118118                        TPRINTF("tid%" PRIu64 ": pi*10e8=%" PRIun " should be %" PRIun "\n",
    119                             THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8);
     119                            THREAD->tid, (sysarg_t) (100000000 * pi), (sysarg_t) PI_10e8);
    120120                        atomic_inc(&threads_fault);
    121121                        break;
  • kernel/test/fpu/mips2.c

    r554debd r96b02eb9  
    4848{
    4949        int i;
    50         int arg __attribute__((aligned(16))) = (int) ((unative_t) data);
     50        int arg __attribute__((aligned(16))) = (int) ((sysarg_t) data);
    5151        int after_arg __attribute__((aligned(16)));
    5252       
     
    8080{
    8181        int i;
    82         int arg __attribute__((aligned(16))) = (int) ((unative_t) data);
     82        int arg __attribute__((aligned(16))) = (int) ((sysarg_t) data);
    8383        int after_arg __attribute__((aligned(16)));
    8484       
     
    123123                thread_t *t;
    124124               
    125                 if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
     125                if (!(t = thread_create(testit1, (void *) ((sysarg_t) 2 * i), TASK, 0, "testit1", false))) {
    126126                        TPRINTF("could not create thread %u\n", 2 * i);
    127127                        break;
     
    130130                total++;
    131131               
    132                 if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
     132                if (!(t = thread_create(testit2, (void *) ((sysarg_t) 2 * i + 1), TASK, 0, "testit2", false))) {
    133133                        TPRINTF("could not create thread %u\n", 2 * i + 1);
    134134                        break;
  • kernel/test/fpu/sse1.c

    r554debd r96b02eb9  
    4848{
    4949        int i;
    50         int arg __attribute__((aligned(16))) = (int) ((unative_t) data);
     50        int arg __attribute__((aligned(16))) = (int) ((sysarg_t) data);
    5151        int after_arg __attribute__((aligned(16)));
    5252       
     
    7979{
    8080        int i;
    81         int arg __attribute__((aligned(16))) = (int) ((unative_t) data);
     81        int arg __attribute__((aligned(16))) = (int) ((sysarg_t) data);
    8282        int after_arg __attribute__((aligned(16)));
    8383       
     
    121121                thread_t *t;
    122122               
    123                 if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
     123                if (!(t = thread_create(testit1, (void *) ((sysarg_t) 2 * i), TASK, 0, "testit1", false))) {
    124124                        TPRINTF("could not create thread %u\n", 2 * i);
    125125                        break;
     
    128128                total++;
    129129               
    130                 if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
     130                if (!(t = thread_create(testit2, (void *) ((sysarg_t) 2 * i + 1), TASK, 0, "testit2", false))) {
    131131                        TPRINTF("could not create thread %u\n", 2 * i + 1);
    132132                        break;
  • kernel/test/mm/slab1.c

    r554debd r96b02eb9  
    123123static void slabtest(void *data)
    124124{
    125         int offs = (int) (unative_t) data;
     125        int offs = (int) (sysarg_t) data;
    126126        int i, j;
    127127       
     
    156156        semaphore_initialize(&thr_sem, 0);
    157157        for (i = 0; i < THREADS; i++) { 
    158                 if (!(t = thread_create(slabtest, (void *) (unative_t) i, TASK, 0, "slabtest", false))) {
     158                if (!(t = thread_create(slabtest, (void *) (sysarg_t) i, TASK, 0, "slabtest", false))) {
    159159                        TPRINTF("Could not create thread %d\n", i);
    160160                } else
  • kernel/test/print/print2.c

    r554debd r96b02eb9  
    4848        TPRINTF("Real output:     [%#x] [%#5.3x] [%#-5.3x] [%#3.5x] [%#-3.5x]\n\n", 17, 18, 19, 20, 21);
    4949       
    50         unative_t nat = UINTN_C(0x12345678);
     50        sysarg_t nat = UINTN_C(0x12345678);
    5151       
    5252        TPRINTF("Testing printf(\"%%#" PRIx64 " %%#" PRIx32 " %%#" PRIx16 " %%#" PRIx8 " %%#" PRIxn " %%#" PRIx64 " %%s\", (uint64_t) UINT64_C(0x1234567887654321), (uint32_t) UINT32_C(0x12345678), (uint16_t) UINT16_C(0x1234), (uint8_t) UINT8_C(0x12), nat, (uint64_t) UINT64_C(0x1234567887654321), \"Lovely string\"):\n");
Note: See TracChangeset for help on using the changeset viewer.