Subversion Repositories HelenOS

Rev

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

Rev 2927 Rev 3674
Line 113... Line 113...
113
{
113
{
114
    futex_t *futex;
114
    futex_t *futex;
115
    uintptr_t paddr;
115
    uintptr_t paddr;
116
    pte_t *t;
116
    pte_t *t;
117
    ipl_t ipl;
117
    ipl_t ipl;
-
 
118
    int rc;
118
   
119
   
119
    ipl = interrupts_disable();
120
    ipl = interrupts_disable();
120
 
121
 
121
    /*
122
    /*
122
     * Find physical address of futex counter.
123
     * Find physical address of futex counter.
Line 132... Line 133...
132
    page_table_unlock(AS, true);
133
    page_table_unlock(AS, true);
133
   
134
   
134
    interrupts_restore(ipl);   
135
    interrupts_restore(ipl);   
135
 
136
 
136
    futex = futex_find(paddr);
137
    futex = futex_find(paddr);
137
   
138
 
-
 
139
#ifdef CONFIG_UDEBUG
-
 
140
    udebug_stoppable_begin();
-
 
141
#endif
138
    return (unative_t) waitq_sleep_timeout(&futex->wq, usec, flags |
142
    rc = waitq_sleep_timeout(&futex->wq, usec, flags |
139
        SYNCH_FLAGS_INTERRUPTIBLE);
143
        SYNCH_FLAGS_INTERRUPTIBLE);
-
 
144
 
-
 
145
#ifdef CONFIG_UDEBUG
-
 
146
    udebug_stoppable_end();
-
 
147
#endif
-
 
148
    return (unative_t) rc;
140
}
149
}
141
 
150
 
142
/** Wakeup one thread waiting in futex wait queue.
151
/** Wakeup one thread waiting in futex wait queue.
143
 *
152
 *
144
 * @param uaddr Userspace address of the futex counter.
153
 * @param uaddr Userspace address of the futex counter.