1.

Typedef struct{int value;struct process *L;} semaphore;​can any one explain me this piece of code.​

Answer»

Answer:

struct and typedef are two very DIFFERENT things. The struct keyword is used to define, or to refer to, a structure type. ... A typedef , in spite of the NAME, does not define a new type; it merely creates a new name for an existing type.

int VALUE means integer value.

Semaphore is simply a VARIABLE that is non-negative and shared between threads.

I don't KNOW about rest of it.



Discussion

No Comment Found