{"id":27399690,"url":"https://github.com/malisha4065/pthreads","last_synced_at":"2025-04-14T03:20:43.616Z","repository":{"id":284803614,"uuid":"956114073","full_name":"Malisha4065/Pthreads","owner":"Malisha4065","description":"Pthreads tutorial","archived":false,"fork":false,"pushed_at":"2025-03-27T18:22:07.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T19:30:37.089Z","etag":null,"topics":["c","clanguage","multithreading","posix-threads","pthreads"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malisha4065.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-27T18:09:25.000Z","updated_at":"2025-03-27T18:22:10.000Z","dependencies_parsed_at":"2025-03-27T19:30:55.000Z","dependency_job_id":"8058e1b3-953b-48a8-97da-bd1e57cf4454","html_url":"https://github.com/Malisha4065/Pthreads","commit_stats":null,"previous_names":["malisha4065/pthreads"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FPthreads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FPthreads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FPthreads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FPthreads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malisha4065","download_url":"https://codeload.github.com/Malisha4065/Pthreads/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814038,"owners_count":21165667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","clanguage","multithreading","posix-threads","pthreads"],"created_at":"2025-04-14T03:20:43.021Z","updated_at":"2025-04-14T03:20:43.589Z","avatar_url":"https://github.com/Malisha4065.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pthreads Examples\n\nThis repository contains various examples demonstrating the use of POSIX threads (pthreads) in C. Each file showcases a different aspect of multithreading.\n\n## File Descriptions\n\n- `main.c` - Basic thread creation using `pthread_create`.\n- `hello_arg1.c` - Passing arguments to threads using an array.\n- `hello_arg2.c` - Passing multiple arguments to threads using a `struct`.\n- `hello_arg3.c` - Demonstrates incorrect argument passing (race condition example).\n- `join.c` - Using `pthread_join` to wait for threads to complete.\n- `stack.c` - Managing thread stack size with `pthread_attr_setstacksize`.\n- `dotprod_serial.c` - Serial implementation of dot product calculation.\n- `dotprod_mutex.c` - Parallel dot product calculation using mutex for synchronization.\n- `condvar.c` - Demonstrates condition variables for thread synchronization.\n\n## How to Compile and Run\n\nTo compile any of the C files:\n```bash\ngcc -pthread -o \u003coutput_file\u003e \u003csource_file\u003e.c\n```\n\nTo run the compiled program:\n```bash\n./\u003coutput_file\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisha4065%2Fpthreads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalisha4065%2Fpthreads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisha4065%2Fpthreads/lists"}