diff options
author | Max Khon <fjoe@FreeBSD.org> | 2008-07-07 17:23:02 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2008-07-07 17:23:02 +0000 |
commit | 94cf9b394b3b5a499c9c882bf155de673a1f66b2 (patch) | |
tree | d4edc5538037db8c3581e0a624530f327503a843 /devel | |
parent | d69cc91c679ddca53757d957133e9b7094501f7b (diff) | |
download | ports-94cf9b394b3b5a499c9c882bf155de673a1f66b2.tar.gz ports-94cf9b394b3b5a499c9c882bf155de673a1f66b2.zip |
Notes
Diffstat (limited to 'devel')
-rw-r--r-- | devel/dmucs/files/patch-dmucs_db.cc | 12 | ||||
-rw-r--r-- | devel/dmucs/files/patch-dmucs_db.h | 12 | ||||
-rw-r--r-- | devel/dmucs/files/patch-dmucs_msg.cc | 2 | ||||
-rw-r--r-- | devel/dmucs/files/patch-main.cc | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/devel/dmucs/files/patch-dmucs_db.cc b/devel/dmucs/files/patch-dmucs_db.cc index dbd30894e1a8..fd5d0f8e2fd5 100644 --- a/devel/dmucs/files/patch-dmucs_db.cc +++ b/devel/dmucs/files/patch-dmucs_db.cc @@ -5,7 +5,7 @@ DmucsDb::assignCpuToClient(const unsigned int clientIp, const DmucsDprop dprop, - const unsigned int sock) -+ const unsigned long sock) ++ const void *sock) { MutexMonitor m(&mutex_); @@ -14,7 +14,7 @@ void -DmucsDb::releaseCpu(const unsigned int sock) -+DmucsDb::releaseCpu(const unsigned long sock) ++DmucsDb::releaseCpu(const void *sock) { /* Get the dprop so that we can release the cpu back into the correct sub-db in the DmucsDb. */ @@ -23,7 +23,7 @@ void DmucsDpropDb::assignCpuToClient(const unsigned int hostIp, - const unsigned int sock) -+ const unsigned long sock) ++ const void *sock) { struct in_addr t2; t2.s_addr = hostIp; @@ -32,15 +32,15 @@ void -DmucsDpropDb::releaseCpu(const unsigned int sock) -+DmucsDpropDb::releaseCpu(const unsigned long sock) ++DmucsDpropDb::releaseCpu(const void *sock) { - DMUCS_DEBUG((stderr, "releaseCpu for socket 0x%x\n", sock)); -+ DMUCS_DEBUG((stderr, "releaseCpu for socket 0x%lx\n", sock)); ++ DMUCS_DEBUG((stderr, "releaseCpu for socket %p\n", sock)); dmucs_assigned_cpus_iter_t itr = assignedCpus_.find(sock); if (itr == assignedCpus_.end()) { - DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock 0x%x\n", -+ DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock 0x%lx\n", ++ DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock %p\n", sock)); return; } diff --git a/devel/dmucs/files/patch-dmucs_db.h b/devel/dmucs/files/patch-dmucs_db.h index 3fc0f4ef5e29..aa5ca828e31d 100644 --- a/devel/dmucs/files/patch-dmucs_db.h +++ b/devel/dmucs/files/patch-dmucs_db.h @@ -5,7 +5,7 @@ of the connection from the "gethost" application to the dmucs server, and the hostip of the cpu assigned to the "gethost" application. */ - typedef std::map<const unsigned int, const unsigned int> -+ typedef std::map<const unsigned long, const unsigned int> ++ typedef std::map<const void *, const unsigned int> dmucs_assigned_cpus_t; typedef dmucs_assigned_cpus_t::iterator dmucs_assigned_cpus_iter_t; @@ -14,13 +14,13 @@ unsigned int getBestAvailCpu(); void assignCpuToClient(const unsigned int clientIp, - const unsigned int cpuIp); -+ const unsigned long cpuIp); ++ const void *cpuIp); void moveCpus(DmucsHost *host, int oldTier, int newTier); int delCpusFromTier(int tier, unsigned int ipAddr); void addNewHost(DmucsHost *host); - void releaseCpu(const unsigned int sock); -+ void releaseCpu(const unsigned long sock); ++ void releaseCpu(const void *sock); void addToHostSet(dmucs_host_set_t *theSet, DmucsHost *host); void delFromHostSet(dmucs_host_set_t *theSet, DmucsHost *host); @@ -29,7 +29,7 @@ host is released and all we have is the socket information, we can figure out which DpropDb to put the host back into. */ - typedef std::map<int, DmucsDprop> dmucs_sock_dprop_db_t; -+ typedef std::map<long, DmucsDprop> dmucs_sock_dprop_db_t; ++ typedef std::map<const void *, DmucsDprop> dmucs_sock_dprop_db_t; typedef dmucs_sock_dprop_db_t::iterator dmucs_sock_dprop_db_iter_t; dmucs_sock_dprop_db_t sock2DpropDb_; @@ -38,7 +38,7 @@ void assignCpuToClient(const unsigned int clientIp, const DmucsDprop dprop, - const unsigned int sock); -+ const unsigned long sock); ++ const void *sock); void moveCpus(DmucsHost *host, int oldTier, int newTier) { MutexMonitor m(&mutex_); // Assume the DmucsDpropDb is definitely there. @@ -47,7 +47,7 @@ } - void releaseCpu(const unsigned int sock); -+ void releaseCpu(const unsigned long sock); ++ void releaseCpu(const void *sock); void handleSilentHosts() { MutexMonitor m(&mutex_); diff --git a/devel/dmucs/files/patch-dmucs_msg.cc b/devel/dmucs/files/patch-dmucs_msg.cc index 9247ed22ed54..48ff1958f5b8 100644 --- a/devel/dmucs/files/patch-dmucs_msg.cc +++ b/devel/dmucs/files/patch-dmucs_msg.cc @@ -5,7 +5,7 @@ fprintf(stderr, "Giving out %s\n", resolved_name.c_str()); - db->assignCpuToClient(cpuIpAddr, dprop_, (unsigned int) sock); -+ db->assignCpuToClient(cpuIpAddr, dprop_, (unsigned long) sock); ++ db->assignCpuToClient(cpuIpAddr, dprop_, sock); #if 0 fprintf(stderr, "The databases are now:\n"); db->dump(); diff --git a/devel/dmucs/files/patch-main.cc b/devel/dmucs/files/patch-main.cc index 83c9161a16f9..5731c689f142 100644 --- a/devel/dmucs/files/patch-main.cc +++ b/devel/dmucs/files/patch-main.cc @@ -5,7 +5,7 @@ if (Sgets(buf, BUFSIZE, sock_req) == NULL) { DMUCS_DEBUG((stderr, "Socket closed: %s\n", peer2buf(sock_req, buf))); - db->releaseCpu((unsigned int)sock_req); -+ db->releaseCpu((unsigned long)sock_req); ++ db->releaseCpu(sock_req); removeFd(sock_req); return; } |