Because you say
struct arg_struct *args = (struct arg_struct *)args;
instead of
struct arg_struct *args = arguments;
use
struct arg_struct *args = (struct arg_struct *)arguments;
in place of
main() has it's own thread and stack variables. either allocate memory for 'args' in the heap or make it global:
main()
struct arg_struct { int arg1; int arg2;}args;//declares args as global out of main()
Then of course change the references from args->arg1 to args.arg1 etc..
args->arg1
args.arg1