Ignore:
Timestamp:
Feb 18, 2025, 12:54:23 PM (6 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
8705a11
Parents:
3e5fea2
Message:

Clean-up the warnings of the concurrency tests. A lot of little test level fixes, the most interesting repeated one is some formally redundent fallthough statements. pthread_attr_test had to be rewritten because of library restrictions. Changed some types so they would always be pointer sized. There was a library change, there was a function that could not be implemented; I trust that it is included for a reason so I just put it in a comment. There is a change to the compiler, wait-until now uses goto. The labelled breaks were code generated as unlabelled breaks and although it worked out slipped through some checks. Finally, there is one warning that I cannot solve at this time so tests that produce it have been put in their own lax group.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/concurrency/pthread/pthread_attr_test.cfa

    r3e5fea2 rd923fca  
    44#include <thread.hfa>
    55
    6 void* foo(void* _attr){
     6void* foo(void*){
     7    pthread_t self = pthread_self();
     8    pthread_attr_t self_attr;
     9    pthread_getattr_np(self, &self_attr);
     10
    711    size_t size;
    8     pthread_attr_t* attr = (pthread_attr_t*)_attr;
    9     int status = pthread_attr_getstacksize(attr, &size);
     12    int status = pthread_attr_getstacksize(&self_attr, &size);
    1013    if (status != 0){
    1114        sout | "error return code";
     
    1619}
    1720
    18 int main(int argc, char const *argv[])
     21int main()
    1922{
    2023    pthread_attr_t attr;
     
    2326    pthread_t thr;
    2427    void* res;
    25     pthread_create(&thr, &attr, foo, (void*)&attr);
     28    pthread_create(&thr, &attr, foo, (void*)0);
    2629    pthread_join(thr, &res);
    2730    pthread_attr_destroy(&attr);
Note: See TracChangeset for help on using the changeset viewer.