MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / write

Method write

source/kernel/kunixsocket.cpp:210–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210U32 KUnixSocketObject::write(KThread* thread, U32 buffer, U32 len) {
211 this->pid = thread->process->id; // kind of a hack to do this here
212 std::shared_ptr<KUnixSocketObject> con = this->connection.lock();
213 BOXEDWINE_CONDITION& cond = (con?con->lockCond:this->lockCond);
214 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(cond);
215 U32 result = this->internal_write(thread, con, cond, buffer, len);
216 if (con) {
217 BOXEDWINE_CONDITION_SIGNAL_ALL(con->lockCond);
218 }
219 return result;
220}
221
222U32 KUnixSocketObject::writeNative(U8* buffer, U32 len) {
223 if (this->type == K_SOCK_DGRAM) {

Callers

nothing calls this directly

Calls 2

internal_writeMethod · 0.95
lockMethod · 0.45

Tested by

no test coverage detected