0
Follow
0
View

C pthreads threads not executing functions for producer-consumer problem

cuihong008 注册会员
2023-01-25 15:39

You declare

then you use item without ever assigning it to point to anything. Undefined behavior results.

If I fix that (first synthesizing a version struct bufferStruct and choosing a MAX_SIZE) then the program compiles without error and seems to run successfully.

About the Author

Question Info

Publish Time
2023-01-25 15:39
Update Time
2023-01-25 15:39