MCPcopy Create free account
hub / github.com/XpuOS/xsched / Execute

Method Execute

service/server/src/server.cpp:182–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182void Server::Execute(std::shared_ptr<const Operation> operation)
183{
184 PID client_pid = operation->Pid();
185
186 chan_mtx_.lock();
187 auto it = client_chans_.find(client_pid);
188
189 if (it == client_chans_.end()) {
190 chan_mtx_.unlock();
191 // It is possible that the server has received ProcessDestroyEvent in RecvWorker(),
192 // and the channel has been closed before the scheduler processes the event.
193 XDEBG("cannot find client channel for client process " FMT_PID, client_pid);
194 return;
195 }
196
197 std::shared_ptr<ipc::Node> client_chan = it->second;
198 chan_mtx_.unlock();
199
200 XASSERT(client_chan->Send(operation->Data(), operation->Size()),
201 "cannot send operation to client process " FMT_PID, client_pid);
202}
203
204XQueueHandle Server::GetXQueueHandle(const Json::Value &request)
205{

Callers

nothing calls this directly

Calls 5

PidMethod · 0.45
lockMethod · 0.45
unlockMethod · 0.45
DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected