[osal/test]: fix compile error on vs2010

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@65 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-08-07 10:32:18 +00:00
parent 367fa3d4e7
commit a7f4bb2dd1
2 changed files with 6 additions and 4 deletions

View File

@@ -24,8 +24,10 @@
int main()
{
void *tmp = NULL;
mpp_set_env_u32("osal_mem_list", 1);
void *tmp = mpp_malloc(int, 100);
tmp = mpp_malloc(int, 100);
if (tmp) {
mpp_log("malloc success\n");
mpp_free(tmp);

View File

@@ -43,9 +43,10 @@ int main()
int i;
int pdata[MAX_THREAD_NUM];
pthread_t threads[MAX_THREAD_NUM];
pthread_attr_t attr;
void *dummy;
mpp_log("vpu test start\n");
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
@@ -54,9 +55,8 @@ int main()
pthread_create(&threads[i], &attr, thread_test, &pdata[i]);
}
pthread_attr_destroy(&attr);
sleep(2);
void *dummy;
sleep(2);
for (i = 0; i < MAX_THREAD_NUM; i++) {
pthread_join(threads[i], &dummy);