Revision 96cc8d6f src/sim/cspinningthreadpool.cc

View differences:

src/sim/cspinningthreadpool.cc
125 125
        //
126 126
        while ((event = AO_load_read(&threadStates[threadId].msg)) == 0)
127 127
        {
128
            __asm__ ("pause");
128
            __asm__ __volatile__ ("pause");
129 129
        }
130 130

  
131 131
        if (AO_load_read(&cancel) == 1)
......
163 163
    if (barrierMin >= 0)
164 164
    {
165 165
        if (threadStates[barrierMin] < *msg)
166
            while (BARRIERVALID(barrierMin)) {__asm__ ("pause");}
166
            while (BARRIERVALID(barrierMin)) {__asm__ __volatile__ ("pause");}
167 167
        else
168 168
            return;
169 169
    }
......
200 200
        // wait at the next valid barrier if needed of return new barrier pointer
201 201
        //
202 202
        if (barrierMin >= 0 && threadStates[barrierMin] < *msg)
203
            while ((BARRIERVALID(barrierMin))) {__asm__ ("pause");}
203
            while ((BARRIERVALID(barrierMin))) {__asm__ __volatile__ ("pause");}
204 204
        else
205 205
            return;
206 206

  
......
262 262
        std::cout << "waiting for thread " << i << std::endl;
263 263
        while (AO_load_read(&threadStates[i].msg) != 0)
264 264
        {
265
            __asm__ ("pause");
265
            __asm__  __volatile__ ("pause");
266 266
        }
267 267
        AO_store_write(&threadStates[i].msg, 1);
268 268
        pthread_join(workerIDs[i], NULL);

Also available in: Unified diff