| 208 | } |
| 209 | |
| 210 | U32 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 | |
| 222 | U32 KUnixSocketObject::writeNative(U8* buffer, U32 len) { |
| 223 | if (this->type == K_SOCK_DGRAM) { |
nothing calls this directly
no test coverage detected