Skip to content

Commit

Permalink
affinity: remove unused internal tobin function
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird committed Aug 30, 2016
1 parent 4dfe1f1 commit 07975d3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/vsc/utils/affinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,6 @@ def sched_getcpu():
"""Get currently used cpu"""
return _libc.sched_getcpu()

#Utility function
# tobin not used anymore
def tobin(s):
"""Convert integer to binary format"""
# bin() missing in 2.4
# eg: self.cpus.extend([int(x) for x in tobin(bitmask).zfill(NCPUBITS)[::-1]])
if s <= 1:
return str(s)
else:
return tobin(s >> 1) + str(s & 1)


#/* Return the highest priority of any process specified by WHICH and WHO
# (see above); if WHO is zero, the current process, process group, or user
# (as specified by WHO) is used. A lower priority number means higher
Expand Down

0 comments on commit 07975d3

Please sign in to comment.