X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fphy_stub%2Fl1_bdy2.c;h=67f66f88600c68968262d48cd0f6d3e6a623f34c;hb=8b3c1a54b33c87e09512690649ed24775f7a5508;hp=523936af47905d26cd734f1c7ab82620c6dfe692;hpb=5d64905a366e340b65b01021ec4eec4f7350a94e;p=o-du%2Fl2.git diff --git a/src/phy_stub/l1_bdy2.c b/src/phy_stub/l1_bdy2.c index 523936af4..67f66f886 100644 --- a/src/phy_stub/l1_bdy2.c +++ b/src/phy_stub/l1_bdy2.c @@ -21,19 +21,28 @@ #include #include #include +#include #include "lphy_stub.h" +#include "du_log.h" + +uint16_t l1BuildAndSendSlotIndication(); void *GenerateTicks(void *arg) { - uint8_t counter = 2; - while(counter) + int milisec = 1; /* 1ms */ + struct timespec req = {0}; + + req.tv_sec = 0; + req.tv_nsec = milisec * 1000000L; + + while(1) { - sleep(1); - printf("\nPHY_STUB: SLOT indication"); + nanosleep(&req, (struct timespec *)NULL); + /* Send Slot indication indication to lower mac */ - buildAndSendSlotIndication(); - counter--; + l1BuildAndSendSlotIndication(); } + return((void *)NULLP); } void duStartSlotIndicaion() @@ -44,7 +53,7 @@ void duStartSlotIndicaion() ret = pthread_create(&thread, NULL, GenerateTicks, NULL); if(ret) { - printf("\nPHY_STUB: Unable to create thread"); + DU_LOG("\nPHY_STUB: Unable to create thread"); } }