Part Number: TM4C1290NCPDT
Tool/software: Code Composer Studio
The title says it all: after I construct/create a lock object (semaphore or gate), do I have to keep the _Params object in scope? Or is the data from the _Params object copied to the lock object? Here's an example of what I mean:
```
Semaphore_Handle ConstructBinaryPrioritySemaphore(Semaphore_Struct &sem)
{
Semaphore_Params params;
Semaphore_Params_init(¶ms);
params.mode = Semaphore_Mode_BINARY_PRIORITY;
Semaphore_construct(&sem, 0, ¶ms);
return Semaphore_handle(&sem);
}
```
Is the code above correct, or does params being destroyed at the end of the function cause problems?