1# InitSync 2 3 4## Overview 5 6Provides APIs for notifying the Init process of events. 7 8**Since**: 10 9 10 11## Summary 12 13 14### File 15 16| Name| Description| 17| -------- | -------- | 18| [init_sync.h](init__sync_8h.md) | Declares the API for notifying the Init process of events.| 19 20 21### Macros 22 23| Name| Description| 24| -------- | -------- | 25| **EVENT1** 0xf | Defines the event **EVENT1**.| 26| **EVENT1_WAITTIME** 10000 | The value **10000** indicates that the waiting time for **EVENT1** is 10s.| 27| **EVENT2** 0xf0 | Defines the event **EVENT2**.| 28| **EVENT2_WAITTIME** 0 | The value **0** indicates that QS_STAGE2 is not used.| 29| **EVENT3** 0xf00 | Defines the event **EVENT3**.| 30| **EVENT3_WAITTIME** 0 | The value **0** indicates that QS_STAGE3 is not used.| 31 32 33### Functions 34 35| Name| Description| 36| -------- | -------- | 37| int [NotifyInit](#notifyinit) (unsigned long event) | Notifies the Init process of an event. This API can be called by all processes, especially the listened process.| 38 39 40## Function Description 41 42 43### NotifyInit() 44 45``` 46int NotifyInit (unsigned long event) 47``` 48 49**Description** 50 51Notifies the Init process of an event. This API can be called by all processes, especially the listened process. 52 53**Parameters** 54 55| Name| Description| 56| -------- | -------- | 57| event | The events should be consistent between the listener (init process) and the notifier.| 58 59**Returns** 60 61Returns **-1** if the operation fails. 62