It was not initialzing the protocol field when priority inheritance is
enabled. All credits should go to Gregory Nutt who wrote the original
commit.
Change-Id: Ib50bf1c0e4d21d306492c50d944dc6a03e5e2bc7
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported
769427ed from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
ret = EINVAL;
} else {
attr->pshared = 0;
+
+#ifdef CONFIG_PRIORITY_INHERITANCE
+ attr->proto = SEM_PRIO_INHERIT;
+#endif
+
#ifdef CONFIG_MUTEX_TYPES
attr->type = PTHREAD_MUTEX_DEFAULT;
#endif