haiku/headers/private/media/PortPool.h
Axel Dörfler 9834d875d0 * Rewrote PortPool, and put it into the BPrivate namespace.
* Renamed global variable _PortPool to gPortPool.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 21:28:08 +00:00

42 lines
537 B
C++

/*
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#ifndef PORT_POOL_H
#define PORT_POOL_H
#include <set>
#include <Locker.h>
namespace BPrivate {
class PortPool : BLocker {
public:
PortPool();
~PortPool();
port_id GetPort();
void PutPort(port_id port);
private:
typedef std::set<port_id> PortSet;
PortSet fPool;
};
extern PortPool* gPortPool;
} // namespace BPrivate
using BPrivate::gPortPool;
#endif // PORT_POOL_H