/* GThreads Implementation */ /* CS6210 Fall 1999 */ /* YOUR NAME HERE */ #include "gthreads.h" /* Global Declarations */ /* Static Functions */ /* Global Function */ /* Perform any initialization needed for GThreads */ int GThread_init( int SchedulingInterval) /* Context switch interval, in microseconds */ { return(GT_FAILED); } int GThread_create( /* Create a new thread */ void* pStartFunc, /* Address of starting function for thread */ void* pParam, /* Address of a parameter to be passed to thread */ int StackSize) /* Size of stack for this thread ( in 4 byte units) */ /* Return GT_SUCCESS if Succeeded */ { return(GT_FAILED); } void GThread_yield(void)/* Relinquish control of CPU to another thread */ { } void GThread_exit(void) /* Notify scheduler that thread has completed */ /* DOES NOT RETURN */ { } int GThread_count() /* Return number of threads active */ { return(0); } /* Mutex related calls */ int GTMutex_create( /* Create a new mutex */ GT_MUTEX* pMutex) /* Address of mutex to create */ /* Return GT_SUCCESS if Succeeded */ { return(GT_FAILED); } void GTMutex_lock( /* Lock the specified mutex */ GT_MUTEX Mutex) /* Mutex to lock */ { } int GTMutex_unlock( /* Unlock the specified mutex */ GT_MUTEX Mutex) /* Mutex to unlock */ { return(GT_FAILED); } int GTMutex_islocked( /* Return status of mutex, 1 = locked, 0 = not locked */ GT_MUTEX Mutex) /* Mutex to check */ { return(0); } int GTMutex_SCount( /* Return number of successful locks */ GT_MUTEX Mutex) /* Mutex to check */ { return(0); } int GTMutex_UCount( /* Return number of unsuccessful locks */ GT_MUTEX Mutex) /* Mutex to check */ { return(0); }