MCPcopy Create free account
hub / github.com/ceph/ceph / notify

Method notify

src/common/event_socket.h:48–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 return -EINVAL;
47 }
48 int notify() {
49 int ret;
50 switch (type) {
51 case EVENT_SOCKET_TYPE_PIPE:
52 {
53 char buf[1];
54 buf[0] = 'i';
55 ret = write(socket, buf, 1);
56 if (ret < 0)
57 ret = -errno;
58 else
59 ret = 0;
60 break;
61 }
62#ifdef HAVE_EVENTFD
63 case EVENT_SOCKET_TYPE_EVENTFD:
64 {
65 uint64_t value = 1;
66 ret = write(socket, &value, sizeof (value));
67 if (ret < 0)
68 ret = -errno;
69 else
70 ret = 0;
71 break;
72 }
73#endif
74 default:
75 {
76 ret = -1;
77 break;
78 }
79 }
80 return ret;
81 }
82};
83
84#endif

Callers

nothing calls this directly

Calls 1

writeFunction · 0.70

Tested by

no test coverage detected