I am trying to create my own header file with for pthread.h. my_pthread.h
I am having a issue with pthread_create function with following.
At line (399): "Element 0 Expected 0 Was 10. Function pthread_create Argument __restrict__thread. Function called with unexpected argument value."
my_pthread.h looks like below.
typedef unsigned long int pthread_t;
typedef union pthread_attr_t pthread_attr_t;
int pthread_create(pthread_t * __restrict__thread,
const pthread_attr_t *attr,
void *(*start_routine) (void *arg),
void * __restrict__arg);
int pthread_cancel (pthread_t __th);
int pthread_setcancelstate (int __state, int *__oldstate);
int pthread_cancel (pthread_t __th);
void pthread_testcancel (void);
I tried changing the yml file as below but no success.
:treat_as: uint8: HEX8 uint16: HEX16 uint32: UINT32 int8: INT8 bool: UINT8 pthread_t: UINT32
in actual pthead.h I have follwing
In file included from test/support/evcc_pthread.h:3:0,
from build/test/mocks/mock_evcc_pthread.h:6,
from test/comms/test_can.c:8:
test/support/unity_helper.h:9:2: error: conflicting types for ‘pthread_t’
}pthread_t;
^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:254:0,
from /usr/include/net/if.h:25,
from include/comms/can.h:7,
from src/comms/can.c:3,
from test/comms/test_can.c:3:
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:27:27: note: previous declaration of ‘pthread_t’ was here
typedef unsigned long int pthread_t;
(original cause to doing this Ceedling can not find /usr/include/pthread.h in the search paths although that file exists)
ERROR: Found no file 'pthread.h' in search paths.
How can I get pthread_create_ExpectAndReturn working properly?
I am trying to create my own header file with for pthread.h. my_pthread.h
I am having a issue with pthread_create function with following.
At line (399): "Element 0 Expected 0 Was 10. Function pthread_create Argument __restrict__thread. Function called with unexpected argument value."
my_pthread.h looks like below.
my test looks like below
I tried changing the yml file as below but no success.
![image](https://user-images.githubusercontent.com/23205104/166500705-24f9e44e-1947-475f-9c32-66b2d5457c0b.png)
:treat_as: uint8: HEX8 uint16: HEX16 uint32: UINT32 int8: INT8 bool: UINT8 pthread_t: UINT32
in actual pthead.h I have follwingI have a unity helper and I checked at following. https://github.com/ThrowTheSwitch/CMock/issues/167 https://papers707.rssing.com/chan-6065534/latest.php#c6065534a4?zx=813. But does not solve the issue and get following error
(original cause to doing this Ceedling can not find /usr/include/pthread.h in the search paths although that file exists)
ERROR: Found no file 'pthread.h' in search paths.
How can I get pthread_create_ExpectAndReturn working properly?