SWDEV-470698 - fix formatting, add format check workflow (#657)
This commit is contained in:
1 szülő
5840940caa
commit
f7338717ae
1574 files changed
+162903
-199277
No files matched your search
@@ -33,16 +33,16 @@
|
||||
//! pack the function pointer and data inside this struct
|
||||
typedef struct __argsToThreadFunc {
|
||||
oclThreadFunc func;
|
||||
void *data;
|
||||
void* data;
|
||||
|
||||
} argsToThreadFunc;
|
||||
|
||||
#ifdef _WIN32
|
||||
//! Windows thread callback - invokes the callback set by
|
||||
//! the application in OCLThread constructor
|
||||
unsigned _stdcall win32ThreadFunc(void *args) {
|
||||
argsToThreadFunc *ptr = (argsToThreadFunc *)args;
|
||||
OCLutil::Thread *obj = (OCLutil::Thread *)ptr->data;
|
||||
unsigned _stdcall win32ThreadFunc(void* args) {
|
||||
argsToThreadFunc* ptr = (argsToThreadFunc*)args;
|
||||
OCLutil::Thread* obj = (OCLutil::Thread*)ptr->data;
|
||||
ptr->func(obj->getData());
|
||||
delete args;
|
||||
return 0;
|
||||
@@ -138,7 +138,7 @@ OCLutil::Thread::~Thread() {
|
||||
//!
|
||||
//! Create a new thread and return the status of the operation
|
||||
//!
|
||||
bool OCLutil::Thread::create(oclThreadFunc func, void *arg) {
|
||||
bool OCLutil::Thread::create(oclThreadFunc func, void* arg) {
|
||||
// Save the data internally
|
||||
_data = arg;
|
||||
|
||||
@@ -150,7 +150,7 @@ bool OCLutil::Thread::create(oclThreadFunc func, void *arg) {
|
||||
// Setup the callback struct for thread function and pass to the
|
||||
// begin thread routine
|
||||
// xxx The following struct is allocated but never freed!!!!
|
||||
argsToThreadFunc *args = new argsToThreadFunc;
|
||||
argsToThreadFunc* args = new argsToThreadFunc;
|
||||
args->func = func;
|
||||
args->data = this;
|
||||
|
||||
@@ -166,8 +166,7 @@ bool OCLutil::Thread::create(oclThreadFunc func, void *arg) {
|
||||
retVal = pthread_create(&_tid, NULL, func, arg);
|
||||
|
||||
if (verbose)
|
||||
printf("Done creating thread. Ret value %d, Self = %u\n", retVal,
|
||||
(unsigned int)pthread_self());
|
||||
printf("Done creating thread. Ret value %d, Self = %u\n", retVal, (unsigned int)pthread_self());
|
||||
#endif
|
||||
|
||||
if (retVal != 0) return false;
|
||||
|
||||
Reference in new issue
Block a user