#ifndef __X10_UTIL_CONCURRENT_SIMPLELATCH_H
#define __X10_UTIL_CONCURRENT_SIMPLELATCH_H

#include <x10rt.h>


#define X10_UTIL_CONCURRENT_LOCK_H_NODEPS
#include <x10/util/concurrent/Lock.h>
#undef X10_UTIL_CONCURRENT_LOCK_H_NODEPS
#define X10_LANG_BOOLEAN_H_NODEPS
#include <x10/lang/Boolean.h>
#undef X10_LANG_BOOLEAN_H_NODEPS
namespace x10 { namespace io { 
class SerialData;
} } 
namespace x10 { namespace lang { 
class UnsupportedOperationException;
} } 
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace lang { 
class Object;
} } 
namespace x10 { namespace lang { 
class Runtime__Worker;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace lang { 
class Runtime;
} } 
namespace x10 { namespace compiler { 
class Pinned;
} } 
namespace x10 { namespace util { namespace concurrent { 

class SimpleLatch : public x10::util::concurrent::Lock   {
    public:
    RTT_H_DECLS_CLASS
    
    static x10aux::itable_entry _itables[3];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    static x10::io::CustomSerialization::itable<x10::util::concurrent::SimpleLatch > _itable_0;
    
    static x10::lang::Any::itable<x10::util::concurrent::SimpleLatch > _itable_1;
    
    void _constructor();
    
    static x10aux::ref<x10::util::concurrent::SimpleLatch> _make();
    
    virtual x10aux::ref<x10::io::SerialData> serialize();
    void _constructor(x10aux::ref<x10::io::SerialData> id__175);
    
    static x10aux::ref<x10::util::concurrent::SimpleLatch> _make(x10aux::ref<x10::io::SerialData> id__175);
    
    x10aux::ref<x10::lang::Runtime__Worker> FMGL(worker);
    
    x10_boolean FMGL(state);
    
    virtual void await();
    virtual void release();
    virtual x10_boolean __apply();
    virtual x10aux::ref<x10::util::concurrent::SimpleLatch> x10__util__concurrent__SimpleLatch____x10__util__concurrent__SimpleLatch__this(
      );
    void __fieldInitializers51216();
    
    // Serialization
    public: static const x10aux::serialization_id_t _serialization_id;
    
    public: virtual x10aux::serialization_id_t _get_serialization_id() {
         return _serialization_id;
    }
    
    public: virtual void _serialize_body(x10aux::serialization_buffer& buf);
    
    public: static x10aux::ref<x10::lang::Reference> _deserializer(x10aux::deserialization_buffer& buf);
    
    public: void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } } 
#endif // X10_UTIL_CONCURRENT_SIMPLELATCH_H

namespace x10 { namespace util { namespace concurrent { 
class SimpleLatch;
} } } 

#ifndef X10_UTIL_CONCURRENT_SIMPLELATCH_H_NODEPS
#define X10_UTIL_CONCURRENT_SIMPLELATCH_H_NODEPS
#ifndef X10_UTIL_CONCURRENT_SIMPLELATCH_H_GENERICS
#define X10_UTIL_CONCURRENT_SIMPLELATCH_H_GENERICS
#endif // X10_UTIL_CONCURRENT_SIMPLELATCH_H_GENERICS
#endif // __X10_UTIL_CONCURRENT_SIMPLELATCH_H_NODEPS
