Skip to content
Snippets Groups Projects
Commit 5a8bfe36 authored by Kang Hyeonuk's avatar Kang Hyeonuk
Browse files

report15.md

parent 0a4254e7
No related branches found
No related tags found
No related merge requests found
......@@ -6,17 +6,15 @@ int bbb = 0;
void fn_s()
{
char bufff[10];
static int a = 0;
setvbuf(stdout,bufff, _IOFBF,10);
printf("== %d %d ==",a++, bbb++);
printf("== %d %d ==\n",a++, bbb++);
}
void *run (void *arg)
{
printf("Hello world of POSIX threads.%d\n", (int) (0));
for (int i = 0; i < 10; i++)
printf("Hello world of POSXI threads.%d\n", (int) (0) );
for (int i = 0; i < 100; i++)
{
sleep(1);
fn_s();
......@@ -28,6 +26,10 @@ void *run (void *arg)
int main()
{
int result1;
run((void *) 0);
sleep(10);
run((void *) 0);
printf("Thread return %d at the end\n", result1);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment