Skip to content

Commit 07975d3

Browse files
committed
affinity: remove unused internal tobin function
1 parent 4dfe1f1 commit 07975d3

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

lib/vsc/utils/affinity.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,6 @@ def sched_getcpu():
234234
"""Get currently used cpu"""
235235
return _libc.sched_getcpu()
236236

237-
#Utility function
238-
# tobin not used anymore
239-
def tobin(s):
240-
"""Convert integer to binary format"""
241-
# bin() missing in 2.4
242-
# eg: self.cpus.extend([int(x) for x in tobin(bitmask).zfill(NCPUBITS)[::-1]])
243-
if s <= 1:
244-
return str(s)
245-
else:
246-
return tobin(s >> 1) + str(s & 1)
247-
248-
249237
#/* Return the highest priority of any process specified by WHICH and WHO
250238
# (see above); if WHO is zero, the current process, process group, or user
251239
# (as specified by WHO) is used. A lower priority number means higher

0 commit comments

Comments
 (0)