There is a problem that when an execution request for the same app is delivered
before AMD executes the app and obtains the PID information, it cannot deliver
the PID information to the proxy. This problem creates a blocking state in the proxy.
In the FlushPendingRequests() method, if the request type is 'rpc-port',
modify it so that the result is immediately delivered to the caller.
Change-Id: I13334803267e1297df1d1a17ce673ef40feacb4d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
if (pid < 0) {
if (launch_context->IsPending()) {
auto& pending_item = launch_context->GetPendingItem();
+ pending_item->SetPid(pid);
auto& inst = amd::RequestManager::GetInst();
inst.FlushPendingReplyInfos(pending_item, false);
inst.FlushPendingRequests(pending_item);
if (item == nullptr)
return;
+ pid_t pid = item->GetPid();
auto& requests = item->GetRequests();
- requests.remove_if([this](RequestPtr& req) -> bool {
+ requests.remove_if([this, pid](RequestPtr& req) -> bool {
req->UnsetTimer();
+ if (req->GetRequestType() == "rpc-port")
+ req->SendResult(pid);
+
PushRequest(std::move(req), AMD_PRIORITY_70);
return true;
});