I assume you're using linux and that the system V interprocess communication (IPC) mechanism are OK to use. You could also use posix shared memory and posix semaphores.
You don't really need shared memory or semaphores if the producer and consumer are threads in the same process (as you imply), but I understand that it may be a requirement for your assignment.
The functions you're looking for are
shmget, shmat, and shmdt for shared memory. You can read the man pages for them.
Here is a simple example of creating shared memory.
For semaphores, you need the semget, and semop functions. I guess you'll be using a binary semaphore to get exclusive access to your shared memory. If you're using producer and consumer threads, then you should use pthread mutex objects instead of semaphores but you could use semaphores as an exercise.
key_t key = 0x1234;
// Or use ftok function
if ((shmid = shmget(key, sizeof(WorkUnit)*10, IPC_CREAT | 0666)) < 0)
if ((pShm = (WorkUnit*)shmat(shmid, NULL, 0)) == (void*)-1)
/* Do some work then detach from shared memory */
I hope that starts you off. You really need to specify more information about your problem.