Changeset 582a0b8 in mainline for uspace/app/tester/thread/thread1.c


Ignore:
Timestamp:
2017-05-08T19:20:39Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2c8533
Parents:
73db198
Message:

Remove unistd.h

  • Rename usleep() and sleep() to thread_usleep() and thread_sleep() and move to thread.[hc].
  • Include stddef.h in order to provide NULL.
  • Move getpagesize() to libposix.
  • Sync uspace/dist/src/c/demos with originals.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/thread/thread1.c

    r73db198 r582a0b8  
    3434#include <thread.h>
    3535#include <stdio.h>
    36 #include <unistd.h>
     36#include <stddef.h>
    3737#include <inttypes.h>
    3838#include "../tester.h"
     
    4646       
    4747        while (atomic_get(&finish))
    48                 usleep(100000);
     48                thread_usleep(100000);
    4949       
    5050        atomic_inc(&threads_finished);
     
    7070       
    7171        TPRINTF("\nRunning threads for %u seconds...", DELAY);
    72         sleep(DELAY);
     72        thread_sleep(DELAY);
    7373        TPRINTF("\n");
    7474       
     
    7777                TPRINTF("Threads left: %" PRIua "\n",
    7878                    total - atomic_get(&threads_finished));
    79                 sleep(1);
     79                thread_sleep(1);
    8080        }
    8181       
Note: See TracChangeset for help on using the changeset viewer.