gpu os abstraction: kos_thread_create/destroy was only used for !LINUX, so just get rid of it

This commit is contained in:
Matt Sealey
2011-08-26 11:08:56 -05:00
parent a0adc5279b
commit 64b3530cc9
3 changed files with 4 additions and 55 deletions

View File

@@ -317,16 +317,9 @@ kgsl_g12_init(gsl_device_t *device)
#endif //_Z180
// create thread for IRQ handling
#if defined(__SYMBIAN32__)
kos_thread_create( (oshandle_t)irq_thread, &(device->irq_thread) );
#elif defined(_LINUX)
device->irq_workq = create_singlethread_workqueue("z1xx_workq");
INIT_WORK(&device->irq_work, kgsl_g12_irqtask);
INIT_WORK(&device->irq_err_work, kgsl_g12_irqerr);
#else
#pragma warning(disable:4152)
device->irq_thread_handle = kos_thread_create( (oshandle_t)irq_thread, &(device->irq_thread) );
#endif
device->irq_workq = create_singlethread_workqueue("z160_workqueue");
INIT_WORK(&device->irq_work, kgsl_g12_irqtask);
INIT_WORK(&device->irq_err_work, kgsl_g12_irqerr);
return (status);
}
@@ -346,11 +339,7 @@ kgsl_g12_close(gsl_device_t *device)
status = device->ftbl.device_idle(device, 1000);
KOS_ASSERT(status == GSL_SUCCESS);
#ifndef _LINUX
kos_thread_destroy(device->irq_thread_handle);
#else
destroy_workqueue(device->irq_workq);
#endif
destroy_workqueue(device->irq_workq);
// shutdown command window
kgsl_cmdwindow_close(device);

View File

@@ -441,34 +441,6 @@ KOS_API unsigned int kos_process_getid(void);
* \return Returns the caller process id.
*//*-------------------------------------------------------------------*/
KOS_API unsigned int kos_callerprocess_getid(void);
/*-------------------------------------------------------------------*//*!
* \external
* \brief Get the id of the current thread.
*
*
* \return Returns the thread id.
*//*-------------------------------------------------------------------*/
KOS_API unsigned int kos_thread_getid(void);
/*-------------------------------------------------------------------*//*!
* \external
* \brief Create a new thread.
*
*
* \param oshandle_t a_function Handle to the function to be executed in the thread.
* \param unsigned int* a_threadId Pointer to a value where to store the ID of the new thread.
* \return Returns an handle to the created thread.
*//*-------------------------------------------------------------------*/
KOS_API oshandle_t kos_thread_create(oshandle_t a_function, unsigned int* a_threadId);
/*-------------------------------------------------------------------*//*!
* \external
* \brief Destroy the given thread.
*
*
* \param oshandle_t a_task Handle to the thread to be destroyed.
*//*-------------------------------------------------------------------*/
KOS_API void kos_thread_destroy( oshandle_t a_task );
//////////////////////////////////////////////////////////////////////////////
// timing API

View File

@@ -363,15 +363,3 @@ KOS_API int kos_syncblock_end(void)
return return_value;
}
KOS_API oshandle_t kos_thread_create(oshandle_t a_function, unsigned int* a_threadId)
{
struct task_struct *task = kthread_run(a_function, 0, "kos_thread_%p", a_threadId);
*a_threadId = (unsigned int)task;
return (oshandle_t)task;
}
KOS_API void kos_thread_destroy( oshandle_t a_task )
{
kthread_stop((struct task_struct *)a_task);
}