Skip to content

Commit d606728

Browse files
committed
Add overall_mutex() method to check for flag
1 parent 7991586 commit d606728

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

i2c_mutex.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fcntl
22
import time
3+
import os
34

45
class Mutex(object):
56

@@ -41,6 +42,13 @@ def enableDebug(self):
4142
def disableDebug(self):
4243
self.mutex_debug = False
4344

45+
def overall_mutex(self):
46+
if os.path.isfile("/run/DexterOS_overall_mutex"):
47+
return True
48+
else:
49+
return False
50+
51+
4452
def __enter__(self):
4553
if self.mutex_debug:
4654
print("I2C mutex enter")

0 commit comments

Comments
 (0)