| 12345678910111213141516171819202122232425262728293031323334 |
- #ifndef __LOCK_Hx__
- #define __LOCK_Hx__
- enum {
- LOCK_ID_DB=0,
- LOCK_ID_MQTT,
- LOCK_ID_SMTP,
- LOCK_ID_PARAS,
-
-
- LOCK_ID_MAX
- };
- //static lock
- int lock_s_init(void);
- int lock_s_deinit(void);
- int lock_s_hold(int id);
- int lock_s_release(int id);
- //dynamic lock
- typedef unsigned long lock_t;
- lock_t lock_d_init(void);
- int lock_d_deinit(lock_t h);
- int lock_d_hold(lock_t h);
- int lock_d_release(lock_t h);
- #endif
|