mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-04 06:15:24 +00:00
Change "unsigned long" to "void *" to take into account LLP64 archs.
This commit is contained in:
parent
d69cc91c67
commit
94cf9b394b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=216483
devel/dmucs/files
@ -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;
|
||||
}
|
||||
|
@ -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_);
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user