Skip to content
Browse files

Added sys_get_openpsid() and setsockopt. Added definitions for other …

…types of events.
  • Loading branch information...
1 parent 6b024ba commit fa58ca3f64937d5b66844256720764da54d80717 @Parlane Parlane committed Dec 8, 2010
View
14 psl1ght/include/sys/psid.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <psl1ght/types.h>
+
+EXTERN_BEGIN
+
+typedef struct OpenPSID {
+ u64 high;
+ u64 low;
+} OpenPSID;
+
+LV2_SYSCALL sys_get_openpsid(OpenPSID *ptr) { return Lv2Syscall1(872, (u64)ptr); }
+
+EXTERN_END
View
2 psl1ght/include/sys/socket.h
@@ -93,6 +93,8 @@ struct linger
#define SOCKET_FD_MASK 0x40000000
+#define SO_NBIO 0x1100
+
EXTERN_BEGIN
int accept(int socket, struct sockaddr* address, socklen_t* address_len);
View
6 psl1ght/include/sysutil/events.h
@@ -5,7 +5,11 @@
EXTERN_BEGIN
-#define EVENT_REQUEST_EXITAPP 0x101
+#define EVENT_REQUEST_EXITAPP 0x101
+#define EVENT_DRAWING_BEGIN 0x121
+#define EVENT_DRAWING_END 0x122
+#define EVENT_MENU_OPEN 0x131
+#define EVENT_MENU_CLOSE 0x132
typedef enum sysEventSlot{
EVENT_SLOT0,
View
1 psl1ght/libc-glue-ppu/source/libsysutil.c
@@ -4,4 +4,3 @@ s32 sysRegisterCallback(sysEventSlot slot, sysCallback func, void * userdata)
{
return sysRegisterCallback_ex(slot, OPD32(func), userdata);
}
-
View
11 psl1ght/sprx/libnet/socket.c
@@ -314,3 +314,14 @@ struct hostent* gethostbyname(const char* name)
return copyhost(ret);
}
+
+
+int setsockopt(int socket, int level, int option_name, const void* option_value, socklen_t option_len)
+{
+ if (!LIBNET_INITIALIZED) {
+ errno = ENOSYS;
+ h_errno = TRY_AGAIN;
+ return -1;
+ }
+ return netErrno(netSetSockOpt(FD(socket), level, option_name, option_value, option_len));
+}

0 comments on commit fa58ca3

Please sign in to comment.
Something went wrong with that request. Please try again.