Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/event_emitter_stream.cc

Issue 26703008: [NaCl SDK] nacl_io: Add support for non-blocking connect/accept (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "nacl_io/event_emitter_stream.h" 5 #include "nacl_io/event_emitter_stream.h"
6 6
7 #include <poll.h> 7 #include <poll.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 21 matching lines...) Expand all
32 if (!in_fifo()->IsEmpty()) 32 if (!in_fifo()->IsEmpty())
33 status |= POLLIN; 33 status |= POLLIN;
34 34
35 if (!out_fifo()->IsFull()) 35 if (!out_fifo()->IsFull())
36 status |= POLLOUT; 36 status |= POLLOUT;
37 37
38 ClearEvents_Locked(~status); 38 ClearEvents_Locked(~status);
39 RaiseEvents_Locked(status); 39 RaiseEvents_Locked(status);
40 } 40 }
41 41
42 uint32_t EventEmitterStream::BytesInOutputFIFO() {
43 return out_fifo()->ReadAvailable();
44 }
45
46 uint32_t EventEmitterStream::SpaceInInputFIFO() {
47 return in_fifo()->WriteAvailable();
48 }
42 49
43 } // namespace nacl_io 50 } // namespace nacl_io
44
45
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698