Changeset 1384


Ignore:
Timestamp:
Apr 26, 2004, 2:10:35 AM (21 years ago)
Author:
bird
Message:

very basic testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/testcase/libc/miscinnotek/tls.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1383 r1384  
    4040    int     cTLSes = 0;
    4141    int     aiTLSes[1024];
     42    int     i;
    4243
    4344    /*
     
    4849    {
    4950        aiTLSes[cTLSes] = __libc_TLSAlloc();
    50         if (aiTLSes[cTLSes] >= 0)
     51        if (aiTLSes[cTLSes] < 0)
    5152            break;
    5253        cTLSes++;
     
    5758        printf("tls: error: cTLSes != max (%d != %d)\n", cTLSes, __LIBC_TLS_MAX);
    5859        cErrors++;
     60    }
     61    /* check for duplicates */
     62    for (i = 0; i <  cTLSes; i++)
     63    {
     64        int j;
     65        for (j = 0; j < cTLSes; j++)
     66        {
     67            if (i != j && aiTLSes[i] == aiTLSes[j])
     68            {
     69                printf("tls: error: duplicate allocation. i=%d, j=%d, index=%d\n",
     70                       i, j, aiTLSes[i]);
     71                cErrors++;
     72            }
     73        }
    5974    }
    6075
Note: See TracChangeset for help on using the changeset viewer.