X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fphy_stub%2Fl1_bdy2.c;h=67f66f88600c68968262d48cd0f6d3e6a623f34c;hb=069ae37558afd5aee2d1072bbf5b517cf665bdd8;hp=43a7864697ec29fdac2fd8d8c2256951b928a4d1;hpb=a6e0e974ff223ae507ae646c354dcfb76d94a1ed;p=o-du%2Fl2.git diff --git a/src/phy_stub/l1_bdy2.c b/src/phy_stub/l1_bdy2.c index 43a786469..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 = 100; - 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"); } }