18d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/****************************************************************************** 28d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * 38d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Copyright (C) 2015 The Android Open Source Project 48d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * 58d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Licensed under the Apache License, Version 2.0 (the "License"); 68d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * you may not use this file except in compliance with the License. 78d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * You may obtain a copy of the License at: 88d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * 98d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * http://www.apache.org/licenses/LICENSE-2.0 108d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * 118d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Unless required by applicable law or agreed to in writing, software 128d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * distributed under the License is distributed on an "AS IS" BASIS, 138d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 148d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * See the License for the specific language governing permissions and 158d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * limitations under the License. 168d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * 178d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S ***************************************************************************** 188d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 198d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/ 208d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/*****************************************************************************/ 218d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 228d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* File Name : ithread.h */ 238d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 248d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* Description : This file contains all the necessary structure and */ 258d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* enumeration definitions needed for the Application */ 268d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* Program Interface(API) of the */ 278d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* Thread Abstraction Layer */ 288d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 298d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* List of Functions : ithread_get_handle_size */ 308d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_get_mutex_lock_size */ 318d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_create */ 328d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_join */ 338d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_get_mutex_struct_size */ 348d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_mutex_init */ 358d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_mutex_destroy */ 368d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_mutex_lock */ 378d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_mutex_unlock */ 388d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_yield */ 398d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_sleep */ 408d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_msleep */ 418d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_usleep */ 428d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_get_sem_struct_size */ 438d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_sem_init */ 448d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_sem_post */ 458d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_sem_wait */ 468d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_sem_destroy */ 478d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* ithread_set_affinity */ 488d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 498d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* Issues / Problems : None */ 508d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 518d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* Revision History : */ 528d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 538d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* DD MM YYYY Author(s) Changes */ 548d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* 06 09 2012 Harish Initial Version */ 558d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* */ 568d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/*****************************************************************************/ 578d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 588d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#ifndef _ITHREAD_H_ 598d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#define _ITHREAD_H_ 608d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 618d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SUWORD32 ithread_get_handle_size(void); 628d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 638d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SUWORD32 ithread_get_mutex_lock_size(void); 648d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 658d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_create(void *thread_handle, void *attribute, void *strt, void *argument); 668d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 678d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_join(void *thread_id, void ** val_ptr); 688d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 698d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_get_mutex_struct_size(void); 708d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 718d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_mutex_init(void *mutex); 728d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 738d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_mutex_destroy(void *mutex); 748d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 758d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_mutex_lock(void *mutex); 768d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 778d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_mutex_unlock(void *mutex); 788d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 798d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ithread_yield(void); 808d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 818d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ithread_sleep(UWORD32 u4_time); 828d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 838d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ithread_msleep(UWORD32 u4_time_ms); 848d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 858d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ithread_usleep(UWORD32 u4_time_us); 868d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 878d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SUWORD32 ithread_get_sem_struct_size(void); 888d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 898d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_sem_init(void *sem,WORD32 pshared,UWORD32 value); 908d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 918d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_sem_post(void *sem); 928d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 938d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_sem_wait(void *sem); 948d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 958d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_sem_destroy(void *sem); 968d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 978d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha SWORD32 ithread_set_affinity(WORD32 core_id); 988d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 998d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ithread_set_name(CHAR *pc_thread_name); 1008d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S 1018d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#endif /* _ITHREAD_H_ */ 102