mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
vault backup: 2022-10-12 10:14:45
This commit is contained in:
parent
bdce9d72d7
commit
b3590cc383
@ -69,16 +69,16 @@ consumer must wait if buffer is empty
|
|||||||
|
|
||||||
``` c
|
``` c
|
||||||
void *myThreadFun(void *vargp) {
|
void *myThreadFun(void *vargp) {
|
||||||
sleep(1)
|
sleep(1);
|
||||||
printf("Hello from Thread \n")
|
printf("Hello from Thread \n");
|
||||||
return NULL
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
pthread_t thread_id
|
pthread_t thread_id;
|
||||||
printf("Before Thread\n")
|
printf("Before Thread\n");
|
||||||
pthread_create(&thread_id, NULL, myThreadFun, NULL)
|
pthread_create(&thread_id, NULL, myThreadFun, NULL);
|
||||||
pthread_join(thread_id, NULL)
|
pthread_join(thread_id, NULL);
|
||||||
printf("After Thread\n");
|
printf("After Thread\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,8 @@ tags:
|
|||||||
- [cosc203-lab17](notes/cosc203-lab17.md)
|
- [cosc203-lab17](notes/cosc203-lab17.md)
|
||||||
- [cosc203-lab18](notes/cosc203-lab18.md)
|
- [cosc203-lab18](notes/cosc203-lab18.md)
|
||||||
- [cosc203-lab19](notes/cosc203-lab19.md)
|
- [cosc203-lab19](notes/cosc203-lab19.md)
|
||||||
|
- [cosc203-lab20](notes/cosc203-lab20.md)
|
||||||
|
- [cosc203-lab25](notes/cosc203-lab25.md)
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
[dns](notes/dns.md)
|
[dns](notes/dns.md)
|
||||||
|
|||||||
9
content/notes/cosc203-lab24.md
Normal file
9
content/notes/cosc203-lab24.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
title: "cosc203-lab24"
|
||||||
|
aliases:
|
||||||
|
tags:
|
||||||
|
- cosc203
|
||||||
|
- lab
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user