{"id":22248658,"url":"https://github.com/semaj87/basic-thread","last_synced_at":"2026-04-28T01:31:43.711Z","repository":{"id":208615374,"uuid":"347390880","full_name":"semaj87/basic-thread","owner":"semaj87","description":"Minimal threading framework written in C","archived":false,"fork":false,"pushed_at":"2021-03-15T19:14:56.000Z","size":207,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-24T21:05:52.580Z","etag":null,"topics":["c","linux-kernel","operating-systems","processes","system-programming","threads"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semaj87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-03-13T14:21:31.000Z","updated_at":"2023-11-21T08:56:51.000Z","dependencies_parsed_at":"2023-11-22T12:42:13.368Z","dependency_job_id":null,"html_url":"https://github.com/semaj87/basic-thread","commit_stats":null,"previous_names":["semaj87/basic-thread"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/semaj87/basic-thread","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semaj87%2Fbasic-thread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semaj87%2Fbasic-thread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semaj87%2Fbasic-thread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semaj87%2Fbasic-thread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semaj87","download_url":"https://codeload.github.com/semaj87/basic-thread/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semaj87%2Fbasic-thread/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","linux-kernel","operating-systems","processes","system-programming","threads"],"created_at":"2024-12-03T06:17:17.976Z","updated_at":"2026-04-28T01:31:43.694Z","avatar_url":"https://github.com/semaj87.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Thread\n\n## Overview\n\nThis project was carried out to better understand the steps needed to develop threads using C within a given process.\nProcesses and threads can be thought of as the execution units of any operating system. A process can be thought\nof as a running instance of a program, that is the time at which a binary executable is executed. Leading on from that,\na thread can be thought of as a unit of execution within a process - It is a possible flow of execution of the main process.\nA given process has at least one thread (the main thread), ensuring that all threads run concurrently in a multithreaded process.\n\nThreads are an efficient way to improve the performance of an application through parallelism. For example, in a browser, multiple\ntabs can be different threads. Or, MS word uses multiple threads, one thread to format the text, other thread to process inputs, etc.\n\nThe main implementation in C was done utilizing the **[POSIX threads/pthreads](https://en.wikipedia.org/wiki/POSIX_Threads)** standard, the **[pthread_create()](https://linux.die.net/man/3/pthread_create)** function and the\n**[pthread_join()](https://linux.die.net/man/3/pthread_join)** function.\n\n\n![Single \u0026 Multithreaded Processes](img/single-and-multithreaded-processes.png)\n\n## Structure\n\n```bash\n.\n├── Dockerfile\n├── LICENSE\n├── README.md\n├── img\n│   └── single-and-multithreaded-processes.png\n└── src\n    ├── Makefile\n    ├── main.c\n    ├── pthreadCreateErrorHandler.c\n    ├── pthreadCreateErrorHandler.h\n    ├── pthreadJoinErrorHandler.c\n    ├── pthreadJoinErrorHandler.h\n    ├── routine.c\n    └── routine.h\n```\n\n## Prerequisites\n\n- Docker\n\n## Usage\n\n1. To build the Docker image\n```bash\ndocker build -t threads .\n```\n2. To run and enter the threads container\n```bash\ndocker run -v ${PWD}/src:/src -it threads\n```\n3. Change into the src directory\n```bash\ncd src\n```\n4. Run the Makefile to build and run the threads executable\n```bash\nmake\n```\n5. To clean the src directory of all object files and the threads executable\n```bash\nmake clean\n```\n\n## License\n\nDistributed under the MIT license - Please see the **LICENSE** file for more information.\n\n## Acknowledgements\n\n- C++ System Programming Cookbook - Onorato Vaticone\n- How Linux Works, 2nd Edition - Brian Ward\n- GeekforGeeks - [Thread function in C/C++](https://www.geeksforgeeks.org/thread-functions-in-c-c/)\n- Linux Docs - [Pthread Docs](https://www.die.net/)\n\n## Contact\n\n- Name: James Aymer\n- Email: [aymerjames@gmail.com](mailto:aymerjames@gmail.com)\n- Linkedin: https://uk.linkedin.com/in/jamesaymer\n- Github: https://github.com/JaymoAymer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemaj87%2Fbasic-thread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemaj87%2Fbasic-thread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemaj87%2Fbasic-thread/lists"}