{"id":13420478,"url":"https://github.com/tudordavid/libslock","last_synced_at":"2026-01-11T04:50:23.734Z","repository":{"id":10769861,"uuid":"13034436","full_name":"tudordavid/libslock","owner":"tudordavid","description":"Cross-platform atomic operations and lock algorithm library","archived":false,"fork":false,"pushed_at":"2018-08-29T08:52:10.000Z","size":215,"stargazers_count":94,"open_issues_count":3,"forks_count":26,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-07-31T22:55:20.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://lpd.epfl.ch/site/ssync","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/tudordavid.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}},"created_at":"2013-09-23T11:49:57.000Z","updated_at":"2024-04-15T20:22:46.000Z","dependencies_parsed_at":"2022-09-19T22:07:27.566Z","dependency_job_id":null,"html_url":"https://github.com/tudordavid/libslock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudordavid%2Flibslock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudordavid%2Flibslock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudordavid%2Flibslock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudordavid%2Flibslock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tudordavid","download_url":"https://codeload.github.com/tudordavid/libslock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695465,"owners_count":20332622,"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":[],"created_at":"2024-07-30T22:01:34.489Z","updated_at":"2025-03-15T06:33:14.920Z","avatar_url":"https://github.com/tudordavid.png","language":"C","funding_links":[],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"readme":"Libslock\n=======\n\nThis repository provides:\n- libslock, a cross-platform interface to atomic operations and other common operations \n- implementations of a number of well-known locking algorithms \n- benchmarks testing the performance of atomic operations and various locking algorithms\n\nThe package has been tested on x86_64 Intel and AMD machines, Tilera and Sparc architectures.\n\nA version of this code was used in the paper **\"Everything you always wanted to know about synchronization but were afraid to ask\"** (accessible here: http://dl.acm.org/citation.cfm?doid=2517349.2522714).\n\nMakefile parameters:\n\nLocking Algorithm\n-----------------\nCan be passed using `LOCK_VERSION` to the Makefile. `LOCK_VERSION` can take one of the following values:\n\n- `USE_TTAS_LOCKS` - use test-and-test-and-set locks\n- `USE_SPINLOCK_LOCKS` - use test-and-set spinlocks\n- `USE_TICKET_LOCKS` - use ticket locks\n- `USE_HTICKET_LOCKS` - use hierarchical ticket locks\n- `USE_MCS_LOCKS` - use MCS locks\n- `USE_CLH_LOCKS` - use CLH locks\n- `USE_HCLH_LOCKS` - use HCLH locks\n- `USE_ARRAY_LOCKS` - use array locks\n- `USE_RW_LOCKS` - use read-write locks (not used in paper, not optimized)\n- `USE_MUTEX_LOCKS` - use the phtread mutex\n\n\nPlatform\n--------\nCan be passed using `PLATFORM` to the Makefile; the settings are specific to the platforms we were using (topology, etc.); for other platforms the characteristics can be defined in `platform_defs.h`. The pre-defined platforms are: \n\n- `XEON` - 8 x 10-core Intel sever\n- `OPTERON` - 8 x 6-core AMD server\n- `NIGARA` - 8-core SparcT2 machine\n- `TILERA` - 36-core Tilera machine\n\nDetailed descriptions of these platforms can be found in the paper.\n\nThe `OPTERON_OPTIMIZE` option uses some of the Opteron-specific optimizations mentioned in the paper.\nAtomic operation to be tested\n-----------------------------\nFor the benchmarks testing atomic operations, this parameter selects the desired operation. Can be passed to the Makefile using `PRIMITIVE`:\n\n- `TEST_FAI` - fetch-and-increment\n- `TEST_TAS` - test-and-set\n- `TEST_CAS` - compare-and-swap\n- `TEST_SWAP` - atomic swap\n- `TEST_CAS_FAI` - fetch-and-increment implemented using compare-and-swap\n\n`ALTERNATE_SOCKETS` is used for thread placement on the Niagara; if not set, hardware threads begin by being assinged to the same core; if set threads are disitributed evenly among the cores\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudordavid%2Flibslock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftudordavid%2Flibslock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudordavid%2Flibslock/lists"}