[Bugfix][bug-view-1152] Fix the problem of high CPU load on nv instruction
Only Configure:No
Affected branch:master/intest
Affected module:nv
Is it affected on: only ZXIC
Self-test: Yes
Doc Update:No
Change-Id: I4a463a6e46655497b43b0089ed3710a142d2b2ca
diff --git a/ap/app/zte_comm/nvserver/nvserver.c b/ap/app/zte_comm/nvserver/nvserver.c
index fe5ba99..4e240f8 100755
--- a/ap/app/zte_comm/nvserver/nvserver.c
+++ b/ap/app/zte_comm/nvserver/nvserver.c
@@ -146,9 +146,14 @@
}
analyMsg(&rcvBuf, &sndBuf);
-
+msgsnd_retry:
if(-1 == msgsnd(msgId, &sndBuf, sizeof(T_NV_MSG_RESULT) - sizeof(long), 0))
{
+ if (errno == EINTR)
+ {
+ printf("nvserver error: msgsnd fail, errno = EINTR!\n");
+ goto msgsnd_retry;
+ }
printf("nvserver error: nvserver msgsnd fail, errno = %d!\n", errno);
continue;
}