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

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_proxy.h

Issue 23005005: [NaCl SDK] nacl_io: Add initial implementations of kill and signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
index 21d68c1de5216e3594603c61e8eb12a4f02fa2cd..a7772462006d2195372ca237dbbc6073daac3b7e 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
@@ -12,6 +12,7 @@
#include "nacl_io/kernel_object.h"
#include "nacl_io/mount_factory.h"
#include "nacl_io/mount_socket.h"
+#include "nacl_io/ossignal.h"
#include "nacl_io/ossocket.h"
#include "nacl_io/ostypes.h"
#include "nacl_io/osutime.h"
@@ -35,7 +36,7 @@ class PepperInterface;
//
// NOTE: The KernelProxy is the only class that should be setting errno. All
// other classes should return Error (as defined by nacl_io/error.h).
-class KernelProxy : protected KernelObject {
+class KernelProxy : public KernelObject {
public:
typedef std::map<std::string, MountFactory*> MountFactoryMap_t;
@@ -125,6 +126,9 @@ class KernelProxy : protected KernelObject {
virtual int tcsetattr(int fd, int optional_actions,
const struct termios *termios_p);
+ virtual int kill(pid_t pid, int sig);
+ virtual sighandler_t sigset(int signum, sighandler_t handler);
+
#ifdef PROVIDES_SOCKET_API
virtual int select(int nfds, fd_set* readfds, fd_set* writefds,
fd_set* exceptfds, struct timeval* timeout);
@@ -179,6 +183,7 @@ class KernelProxy : protected KernelObject {
int dev_;
PepperInterface* ppapi_;
static KernelProxy *s_instance_;
+ sighandler_t sigwinch_handler_;
#ifdef PROVIDES_SOCKET_API
HostResolver host_resolver_;
#endif
@@ -190,6 +195,8 @@ class KernelProxy : protected KernelObject {
DISALLOW_COPY_AND_ASSIGN(KernelProxy);
};
+typedef sdk_util::ScopedRef<KernelProxy> ScopedKernelProxy;
+
} // namespace nacl_io
#endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698