Subversion Repositories HelenOS-historic

Rev

Rev 1153 | Rev 1248 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1153 Rev 1229
Line 91... Line 91...
91
 
91
 
92
/** Sleep in futex wait queue.
92
/** Sleep in futex wait queue.
93
 *
93
 *
94
 * @param uaddr Userspace address of the futex counter.
94
 * @param uaddr Userspace address of the futex counter.
95
 * @param usec If non-zero, number of microseconds this thread is willing to sleep.
95
 * @param usec If non-zero, number of microseconds this thread is willing to sleep.
96
 * @param trydown If usec is zero and trydown is non-zero, conditional operation will be attempted.
96
 * @param trydown If @usec is zero and trydown is non-zero, conditional operation will be attempted.
97
 *
97
 *
98
 * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See synch.h.
98
 * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See synch.h.
99
 *     If there is no physical mapping for uaddr ENOENT is returned.
99
 *     If there is no physical mapping for uaddr ENOENT is returned.
100
 */
100
 */
101
__native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int trydown)
101
__native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int trydown)
Line 216... Line 216...
216
    return futex;
216
    return futex;
217
}
217
}
218
 
218
 
219
/** Compute hash index into futex hash table.
219
/** Compute hash index into futex hash table.
220
 *
220
 *
221
 * @param key Address where the key (i.e. physical address of futex counter) is stored.
221
 * @param key Address where the @key (i.e. physical address of futex counter) is stored.
222
 *
222
 *
223
 * @return Index into futex hash table.
223
 * @return Index into futex hash table.
224
 */
224
 */
225
index_t futex_ht_hash(__native *key)
225
index_t futex_ht_hash(__native *key)
226
{
226
{
Line 229... Line 229...
229
 
229
 
230
/** Compare futex hash table item with a key.
230
/** Compare futex hash table item with a key.
231
 *
231
 *
232
 * @param key Address where the key (i.e. physical address of futex counter) is stored.
232
 * @param key Address where the key (i.e. physical address of futex counter) is stored.
233
 *
233
 *
234
 * @return True if the item matches the key. False otherwise.
234
 * @return True if the item matches the @key. False otherwise.
235
 */
235
 */
236
bool futex_ht_compare(__native *key, count_t keys, link_t *item)
236
bool futex_ht_compare(__native *key, count_t keys, link_t *item)
237
{
237
{
238
    futex_t *futex;
238
    futex_t *futex;
239
 
239