Here i want to execute a thread through two different function.
Here i am getting synchronization problem. I want both task to execute concurrently.

functionA calling thread1 (Incrementing X value)
functionB calling thread1 (Decrementing X value)


How can i do it.. Plz give some suggestions and help.