MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / futex_global_table_delete

Function futex_global_table_delete

components/lwp/lwp_futex_table.c:71–88  ·  view source on GitHub ↗

* @brief Delete a futex from the global hash table * * @param[in] key Pointer to the shared futex key structure * * @return rt_err_t Returns RT_EOK if deleted successfully, -RT_ENOENT if not found */

Source from the content-addressed store, hash-verified

69 * @return rt_err_t Returns RT_EOK if deleted successfully, -RT_ENOENT if not found
70 */
71rt_err_t futex_global_table_delete(struct shared_futex_key *key)
72{
73 rt_err_t rc;
74 struct shared_futex_entry *entry;
75
76 RT_UTHASH_FIND(_futex_hash_head, key, sizeof(struct shared_futex_key), entry);
77 if (entry)
78 {
79 RT_UTHASH_DELETE(_futex_hash_head, entry);
80 rc = RT_EOK;
81 }
82 else
83 {
84 rc = -RT_ENOENT;
85 }
86
87 return rc;
88}

Callers 1

_sftx_destroyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected