It is really hit or miss, but some of the encounters I've had with the US border officials have been such that they really do treat foreigners like a criminal, sometimes in an extremely rude manner. I have always done my best to keep smiling and a sense of humor-- how humiliating-- this is one of the few areas in life that I would stoop to such a level.
This year I flew to Paris and back. The border officials in both countries were just as unsmiling and unfriendly.