sem: Modify default sem flag value in SEM_INITIALIZER
When semaphore is initialized, sem flag should be set FLAGS_INITIALIZED
@@ -136,9 +136,9 @@ typedef struct sem_s sem_t;
*/
#ifdef CONFIG_PRIORITY_INHERITANCE
#if CONFIG_SEM_PREALLOCHOLDERS > 0
-#define SEM_INITIALIZER(c) {(c), 0, NULL} /* semcount, flags, hhead */
+#define SEM_INITIALIZER(c) {(c), FLAGS_INITIALIZED, NULL} /* semcount, flags, hhead */
#else
-#define SEM_INITIALIZER(c) {(c), 0, SEMHOLDER_INITIALIZER} /* semcount, flags, holder */
+#define SEM_INITIALIZER(c) {(c), FLAGS_INITIALIZED, SEMHOLDER_INITIALIZER} /* semcount, flags, holder */
#endif
#else
#define SEM_INITIALIZER(c) {(c)} /* semcount */
