Tr69ConnectionRequestServerPrivate::Tr69ConnectionRequestServerPrivate(Tr69ConnectionRequestServer *pParent) : QObject(pParent), m_pContext(NULL), m_pHttpServer(NULL), m_wPortListen(30005), m_pParent(pParent) { httpServerInit(); contextInit(); }
//Creates a thread that will start off running fn, returning the Tid of the new thread //The created thread is put on a ready queue but does not start execution yet. //The caller of the function continues to execute after the function returns. Tid ULT_CreateThread(void(*fn) (void*), void* parg) { ULT_Maintainence(); if(numberOfThreads >= ULT_MAX_THREADS) return ULT_NOMORE; ucontext_t* context = contextInit(fn, parg); if((context->uc_stack).ss_sp == NULL) return ULT_NOMEMORY; Thread* thread = ThreadInit(context); ThreadListAddToHead(alive, thread); numberOfThreads++; return thread->id; }