{"id":28931779,"url":"https://github.com/pinkerton/locks","last_synced_at":"2026-02-09T03:03:44.617Z","repository":{"id":74449446,"uuid":"87112861","full_name":"pinkerton/locks","owner":"pinkerton","description":"x86 spinlock implementation","archived":false,"fork":false,"pushed_at":"2017-04-04T04:19:02.000Z","size":643,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-22T16:08:37.727Z","etag":null,"topics":["distributed-systems","locking","spinlock"],"latest_commit_sha":null,"homepage":"","language":"CMake","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/pinkerton.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-04-03T19:31:31.000Z","updated_at":"2023-06-07T04:53:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"615efe16-3848-4418-bcd9-a38ef8330bb1","html_url":"https://github.com/pinkerton/locks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pinkerton/locks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinkerton%2Flocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinkerton%2Flocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinkerton%2Flocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinkerton%2Flocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinkerton","download_url":"https://codeload.github.com/pinkerton/locks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinkerton%2Flocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29255388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T01:52:29.835Z","status":"online","status_checked_at":"2026-02-09T02:00:09.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["distributed-systems","locking","spinlock"],"created_at":"2025-06-22T16:08:09.700Z","updated_at":"2026-02-09T03:03:44.611Z","avatar_url":"https://github.com/pinkerton.png","language":"CMake","readme":"# Locks\n\nImplementation of a basic spinlock in C and x86 assembly.\n\n# Resources\n\n * [XCHG](http://x86.renejeschke.de/html/file_module_x86_id_328.html)\n * [Pseudocode](http://stackoverflow.com/questions/22424209/tsl-instruction-reference)\n * [Test \u0026 set](https://en.wikipedia.org/wiki/Test-and-set)\n * [Semaphore reference](https://en.wikipedia.org/wiki/Semaphore_(programming))\n * [Extended ASM](https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Clobbers)\n * [GCC inline assembly](http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s5)\n\n\nBasic usage\n====\n * Clone this repo\n * `cd locks`\n * `mkdir build \u0026\u0026 cd build`\n * `cmake ..`\n * `make`\n * `./run_tests`\n\nCMake\n====\n\nCMake is configured here to naively glob together all of the source and header files in `/src` and `/include` respectively. By default, it will compile files with debug symbols and all unit tests when you run `make`. This has been all I've needed for doing homework sets and small projects, but it will need to be configured to do release / optimized builds eventually.\n\nFor now, `make test` does not work because it seems to require all tests to be defined in `tests/CMakeLists.txt`, when I'd rather it run all tests automatically without explicitly defining them there. This should be possible to do, but running `targets/run_tests` also has the \"correct\" behavior. I think this is related to messing with `CMAKE_RUNTIME_OUTPUT_DIRECTORY`. \n\n\nLicense\n====\n\nMIT. See LICENSE for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinkerton%2Flocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinkerton%2Flocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinkerton%2Flocks/lists"}