Abnormal producer consumer problem driving me nuts

view story

http://www.unix.com – normally, i hate asking someone to do my homework for me but am getting desperate right now. i have a project about consumer producer problem. the deadline is tonight at 23:55. but i havent gotten it working yet. i just COULDNT get it to work right yet. the problem is as follows: the C - program will prompt for the following integer inputs: Code: m: the number of producer threads n: the number of consumer threads k: the size of the bounded buffer array i: the number of candy items to be filled in each box j: the number of candy items produced by each producer thread before it quits now (HowTos)