00001 /*-------------------------------------------------------------------- 00002 * 00003 * (C) Copyright Koninklijke Philips Electronics NV 2006. 00004 * All rights reserved. This software is licensed under the terms of 00005 * version 2.1 of the GNU Lesser General Public License as published 00006 * by the Free Software Foundation. For licensing and warranty 00007 * information, see the file COPYING in the main directory. 00008 * 00009 *------------------------------------------------------------------*/ 00010 00011 #ifndef SEMAPHOREIMPL_CC 00012 #define SEMAPHOREIMPL_CC 00013 00014 #include "semaphoreimpl.h" 00015 #include "taskimpl.h" 00016 #include "os.h" 00017 #include "ossemaphore.h" 00018 00019 SemaphoreImpl::SemaphoreImpl(int credit) 00020 { 00021 impl = TaskImpl::OS()->createSemaphore(credit); 00022 } 00023 00024 SemaphoreImpl::~SemaphoreImpl() 00025 { 00026 delete impl; 00027 } 00028 00029 void SemaphoreImpl::wait() 00030 { 00031 impl->wait(); 00032 } 00033 00034 void SemaphoreImpl::signal() 00035 { 00036 impl->signal(); 00037 } 00038 00039 #endif