locking variables / pthreads...
BloodyCactus
Posts: 6
so in LMM mode, I can use __lock and __unlock.. but what can I do when I compile against -mcog? since linking complains about a whole bunch of __CMPSWAPSI calls..
tried linking -lcog -lpthread etc but those missing calls dont go away.
so how do I go about locking and synching when using -mcog?
tried linking -lcog -lpthread etc but those missing calls dont go away.
so how do I go about locking and synching when using -mcog?
Comments
grepping libcog.a I see it has hits to __CMPSWAPSI, just linking my cog using __lock/__unlock gets 'undefined reference to..' so I see that __CMPSWAPSI is in the crt0.s asm files of lmm/cmm/xmm... but not crt0_cog.s
hmm so popssibly I could take the locking code from crt0_lmm.s and stick it in crt0_cog.s.. ugh.