… | |
… | |
337 | } |
337 | } |
338 | |
338 | |
339 | ECB_MEMORY_FENCE_RELEASE; |
339 | ECB_MEMORY_FENCE_RELEASE; |
340 | /* as an extension to C, we hope that the volatile will make this atomic and once-only */ |
340 | /* as an extension to C, we hope that the volatile will make this atomic and once-only */ |
341 | *(volatile unsigned *)&ring->head = tail; |
341 | *(volatile unsigned *)&ring->head = tail; |
342 | /* make sure kernel can see our new head value - probably not required */ |
|
|
343 | |
342 | |
344 | return 1; |
343 | return 1; |
345 | } |
344 | } |
346 | |
345 | |
347 | /* read at least one event from kernel, or timeout */ |
346 | /* read at least one event from kernel, or timeout */ |