Changeset 4b7512a in examples-v2


Ignore:
Timestamp:
Sep 24, 2018, 10:34:09 PM (7 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
286403d7a3d0e521179e677c0d2fd7549c9ceab4
Children:
f4ce641
Parents:
2c8ab41
git-author:
Joel Sherrill <joel@…> (09/24/18 22:34:09)
git-committer:
Joel Sherrill <joel@…> (09/24/18 22:52:53)
Message:

c11_thread01/test.c: Fix minor issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c11/c11_thread01/test.c

    r2c8ab41 r4b7512a  
    2020  printf("*** Subsystem initialization should only happen once\n");
    2121}
     22
    2223void initialize_subsystem(void)
    2324{
    24   static once_flag initialize_subsystem_only_once= ONCE_FLAG_INIT;
     25  static once_flag initialize_subsystem_only_once = ONCE_FLAG_INIT;
    2526
    2627  call_once(&initialize_subsystem_only_once, initialize_subsystem_once);
    2728}
     29
    2830int Thread1_Body(void *arg)
    2931{
     
    4345  rc = thrd_join(thread2, &result);
    4446  assert(rc == thrd_success);
    45   printf("Thread1 - thread1 exited with %d\n", result);
     47  printf("Thread1 - thread2 exited with %d\n", result);
    4648
    4749  puts("Thread1 - exit" );
     
    9597  assert(rc != 0);
    9698
    97   puts("main - sleep and let Thread2 run");
     99  puts("main - sleep and let other threads run");
    98100  rc = thrd_sleep(&delay, NULL);
    99101  assert(rc == 0);
Note: See TracChangeset for help on using the changeset viewer.