Here's my code:

This was taken from https://elinux.org/RPi_GPIO_Code_Samples which gives an example mapping in C for the GPIO pin manipulation.
I reduced the wait time to a single nanosecond, purely for demonstration purposes. I initially had 100L in place of 1L, where L is simply long since the function nanosleep requires that data type.
This is the oscilloscope output from GPIO pin 7:

How can I get a 100 nanosecond width pulse?
Deleting the nanosleep calls gives around 9ns width, but is triangular likely due to capacitances in the lines.

Is there a dummy function call that only takes a few cycles of the CPU to complete?