mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 17:46:50 +08:00
[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:
@@ -24,8 +24,10 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
void *tmp = NULL;
|
||||||
|
|
||||||
mpp_set_env_u32("osal_mem_list", 1);
|
mpp_set_env_u32("osal_mem_list", 1);
|
||||||
void *tmp = mpp_malloc(int, 100);
|
tmp = mpp_malloc(int, 100);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
mpp_log("malloc success\n");
|
mpp_log("malloc success\n");
|
||||||
mpp_free(tmp);
|
mpp_free(tmp);
|
||||||
|
@@ -43,9 +43,10 @@ int main()
|
|||||||
int i;
|
int i;
|
||||||
int pdata[MAX_THREAD_NUM];
|
int pdata[MAX_THREAD_NUM];
|
||||||
pthread_t threads[MAX_THREAD_NUM];
|
pthread_t threads[MAX_THREAD_NUM];
|
||||||
|
pthread_attr_t attr;
|
||||||
|
void *dummy;
|
||||||
|
|
||||||
mpp_log("vpu test start\n");
|
mpp_log("vpu test start\n");
|
||||||
pthread_attr_t attr;
|
|
||||||
pthread_attr_init(&attr);
|
pthread_attr_init(&attr);
|
||||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
|
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
|
||||||
|
|
||||||
@@ -54,9 +55,8 @@ int main()
|
|||||||
pthread_create(&threads[i], &attr, thread_test, &pdata[i]);
|
pthread_create(&threads[i], &attr, thread_test, &pdata[i]);
|
||||||
}
|
}
|
||||||
pthread_attr_destroy(&attr);
|
pthread_attr_destroy(&attr);
|
||||||
sleep(2);
|
|
||||||
|
|
||||||
void *dummy;
|
sleep(2);
|
||||||
|
|
||||||
for (i = 0; i < MAX_THREAD_NUM; i++) {
|
for (i = 0; i < MAX_THREAD_NUM; i++) {
|
||||||
pthread_join(threads[i], &dummy);
|
pthread_join(threads[i], &dummy);
|
||||||
|
Reference in New Issue
Block a user