posix.cfg: Added support for more posix_trace..() functions

This commit is contained in:
orbitcowboy 2022-12-22 11:39:00 +01:00
parent 5991c33b0e
commit 3c57752c9b
2 changed files with 134 additions and 0 deletions

View File

@ -4739,6 +4739,95 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- int posix_trace_trygetnext_event(trace_id_t trid,
struct posix_trace_event_info *restrict event,
void *restrict data, size_t num_bytes,
size_t *restrict data_len, int *restrict unavailable); -->
<function name="posix_trace_trygetnext_event">
<returnValue type="int"/>
<use-retval/>
<noreturn>false</noreturn>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="out">
<not-null/>
</arg>
<arg nr="3" direction="out">
<not-null/>
</arg>
<arg nr="4" direction="in">
<valid>0:</valid>
</arg>
<arg nr="5" direction="out">
<not-null/>
</arg>
<arg nr="6" direction="out">
<not-null/>
</arg>
</function>
<!-- int posix_trace_timedgetnext_event(trace_id_t trid, struct posix_trace_event_info *restrict event, void *restrict data, size_t num_bytes, size_t *restrict data_len, int *restrict unavailable, const struct timespec *restrict abstime); -->
<function name="posix_trace_timedgetnext_event">
<returnValue type="int"/>
<noreturn>false</noreturn>
<use-retval/>
<pure/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="out">
<not-null/>
</arg>
<arg nr="3" direction="out">
<not-null/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
<valid>0:</valid>
</arg>
<arg nr="5" direction="out">
<not-null/>
</arg>
<arg nr="6" direction="out">
<not-null/>
</arg>
<arg nr="7" direction="in">
<not-null/>
</arg>
</function>
<!-- int posix_trace_getnext_event(trace_id_t trid,
struct posix_trace_event_info *restrict event,
void *restrict data, size_t num_bytes,
size_t *restrict data_len, int *restrict unavailable); -->
<function name="posix_trace_getnext_event">
<returnValue type="int"/>
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="out">
<not-uninit/>
<not-null/>
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-null/>
<minsize type="argvalue" arg="4"/>
</arg>
<arg nr="4" direction="in">
<not-uninit/>
<valid>0:</valid>
</arg>
<arg nr="5" direction="out">
<not-null/>
<not-uninit/>
</arg>
<arg nr="6" direction="out">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize); -->
<!-- int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize); -->
<function name="pthread_attr_getstacksize,pthread_attr_getguardsize">

View File

@ -36,6 +36,51 @@
#include <string.h>
#include <strings.h>
#if __TRACE_H__ // <trace.h>
void nullPointer_posix_trace_trygetnext_event(trace_id_t trid,
struct posix_trace_event_info *event,
void *data, size_t num_bytes,
size_t *data_len, int *unavailable)
{
// cppcheck-suppress nullPointer
(void) posix_trace_trygetnext_event(trid, NULL, data, num_bytes, data_len, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_trygetnext_event(trid, event, NULL, num_bytes, data_len, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_trygetnext_event(trid, event, data, num_bytes, NULL, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_trygetnext_event(trid, event, data, num_bytes, data_len, NULL);
}
int nullPointer_posix_trace_timedgetnext_event(trace_id_t trid, struct posix_trace_event_info *restrict event, void *restrict data, size_t num_bytes, size_t *restrict data_len, int *restrict unavailable, const struct timespec *restrict abstime)
{
// cppcheck-suppress nullPointer
(void) posix_trace_timedgetnext_event(trid, NULL, data, num_bytes, data_len, unavailable, abstime);
// cppcheck-suppress nullPointer
(void) posix_trace_timedgetnext_event(trid, event, NULL, num_bytes, data_len, unavailable, abstime);
// cppcheck-suppress nullPointer
(void) posix_trace_timedgetnext_event(trid, event, data, num_bytes, NULL, unavailable, abstime);
// cppcheck-suppress nullPointer
(void) posix_trace_timedgetnext_event(trid, event, data, num_bytes, data_len, NULL, abstime);
// cppcheck-suppress nullPointer
(void) posix_trace_timedgetnext_event(trid, event, data, num_bytes, data_len, unavailable, NULL);
return posix_trace_timedgetnext_event(trid, event, data, num_bytes, data_len, unavailable, abstime);
}
int nullPointer_posix_trace_getnext_event(trace_id_t trid, struct posix_trace_event_info *restrict event, void *restrict data, size_t num_bytes, size_t *restrict data_len, int *restrict unavailable)
{
// cppcheck-suppress nullPointer
(void) posix_trace_getnext_event(trid, NULL, data, num_bytes, data_len, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_getnext_event(trid, event, NULL, num_bytes, data_len, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_getnext_event(trid, event, data, num_bytes, NULL, unavailable);
// cppcheck-suppress nullPointer
(void) posix_trace_getnext_event(trid, event, data, num_bytes, data_len, NULL);
return posix_trace_getnext_event(trid, event, data, num_bytes, data_len, unavailable);
}
#endif // __TRACE_H__
void nullPointer_pthread_attr_getstack(const pthread_attr_t *attr, void *stackaddr, size_t stacksize) {
// cppcheck-suppress nullPointer
(void) pthread_attr_getstack(NULL, &stackaddr, &stacksize);