How? We have no way to "measure" self-awareness, let alone suppress it.
Would the function for singularity prevention look something like this?
void noSingularity (int selfAwareness) { if (selfAwareness > 1) { selfAwareness = 0; }}
The only way to be absolutely, 100% sure that computers won't get smart enough to think for themselves, is to stop making computers smarter. And good luck convincing people that we should stop developing new technology.