synchronous master-slave communication

Can you explain exactly what you mean by "synchronously" in this context? Do you mean, you ask a question and get an answer?

i mean to ask a question of a device and then stop everything while waiting for an answer (as opposed to asynchronously, where i ask a question, go on with the program, and get the answer later, perhaps as an interrupt or in some place i can poll).

What is the problem with global variables? The response is done in an interrupt handle

there's nothing wrong with it -- but initially i'd thought the onRequest handler could also read data being passed in with the request. this does not appear to be the case. i'd found no examples of anyone using a slave to do request-response type data exchanges of the type done by, say, a 24LC512 EEPROM, and i wanted to implement it.

I have done some examples of sending/receiving data via I2C here (scroll down to "Request/response"):

Gammon Forum : Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino

nice! i would have loved to find this example when i was working on the problem.

You shouldn't need to send things three times. Why do that?

i did it because i'd often get zero instead of the byte i'd requested. i have no idea why -- it was being flaky. i need to investigate further. the other i2c devices on the bus all seem to work fine; it's just the slave that occasionally throws out glitch zeroes in response to queries.