X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=redismodule%2Ftst%2Fmock%2Fsrc%2FcommonStub.cpp;h=5e9a0f1473a90912cd0dfd2b38861897f8761a14;hb=5151f288ed49382ce16986dcd56e783499222cf6;hp=2df1df9597e9873b8920ad2ac935dac499af896b;hpb=a9dd09828c123da4387067c38dedcb54fd348dff;p=ric-plt%2Fdbaas.git diff --git a/redismodule/tst/mock/src/commonStub.cpp b/redismodule/tst/mock/src/commonStub.cpp index 2df1df9..5e9a0f1 100644 --- a/redismodule/tst/mock/src/commonStub.cpp +++ b/redismodule/tst/mock/src/commonStub.cpp @@ -58,3 +58,19 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr, .actualCall("pthread_create") .returnIntValueOrDefault(0); } + +int pthread_detach(pthread_t thread) +{ + (void)thread; + + return mock() + .actualCall("pthread_detach") + .returnIntValueOrDefault(0); +} + +pthread_t pthread_self(void) +{ + return mock() + .actualCall("pthread_self") + .returnIntValueOrDefault(UT_DUMMY_THREAD_ID); +}