MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Accept

Method Accept

Kernel/src/objects/interface.cpp:28–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28long MessageInterface::Accept(FancyRefPtr<MessageEndpoint>& endpoint){
29 acquireLock(&incomingLock);
30 if(incoming.get_length() > 0){
31 auto connection = incoming.remove_at(0);
32 releaseLock(&incomingLock);
33
34 auto channel = MessageEndpoint::CreatePair(msgSize);
35 connection->item2 = channel.item2;
36 connection->item1 = true;
37
38 endpoint = channel.item1;
39 return 1;
40 } else {
41 releaseLock(&incomingLock);
42 return 0;
43 }
44}
45
46FancyRefPtr<MessageEndpoint> MessageInterface::Connect(){
47 if(!active){

Callers

nothing calls this directly

Calls 2

get_lengthMethod · 0.45
remove_atMethod · 0.45

Tested by

no test coverage detected