XDispatch 0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
semaphore.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008-2009 Apple Inc. All rights reserved.
00003  *
00004  * @APPLE_APACHE_LICENSE_HEADER_START@
00005  * 
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  * 
00010  *     http://www.apache.org/licenses/LICENSE-2.0
00011  * 
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  * 
00018  * @APPLE_APACHE_LICENSE_HEADER_END@
00019  */
00020 
00021 #ifndef __DISPATCH_SEMAPHORE__
00022 #define __DISPATCH_SEMAPHORE__
00023 
00029 #ifndef __DISPATCH_INDIRECT__
00030 #error "Please #include <dispatch/dispatch.h> instead of this file directly."
00031 #include <dispatch/base.h> // for HeaderDoc
00032 #endif
00033 
00039 DISPATCH_DECL(dispatch_semaphore);
00040 
00041 __DISPATCH_BEGIN_DECLS
00042 
00059 DISPATCH_EXPORT  
00060 dispatch_semaphore_t
00061 dispatch_semaphore_create(long value);
00062 
00080 DISPATCH_EXPORT  
00081 long
00082 dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout);
00083 
00098 DISPATCH_EXPORT  
00099 long
00100 dispatch_semaphore_signal(dispatch_semaphore_t dsema);
00101 
00102 __DISPATCH_END_DECLS
00103 
00106 #endif /* __DISPATCH_SEMAPHORE__ */

Generated on Tue Jun 12 2012 14:11:47 for XDispatch by Doxygen 1.8.0
© 2010-2012 MLBA (about | privacy) All Rights reserved.