1 / 4

CS3516

CS3516. Administrivia – November 11, 2013. Project 1. Checkpoint: November 14 at 12:01 AM Show and Tell: November 14 & 15. Signup for Show and Tell early to get the timeslot you want. It’s available NOW! If you’re near the end of the signup and you can’t get a slot that works:

mikaia
Download Presentation

CS3516

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS3516 Administrivia – November 11, 2013

  2. Project 1 • Checkpoint: November 14 at 12:01 AM • Show and Tell: November 14 & 15. • Signup for Show and Tell early to get the timeslot you want. It’s available NOW! • If you’re near the end of the signup and you can’t get a slot that works: • 1) Try swapping with a buddy • 2 e-mail the TAs

  3. Project 1 ANY QUESTIONS The starter code for Project1_thread_example.c did not run successfully on all environments. Download the latest version and you should have better success on the CCC machines.

  4. Project 1 unsigned intCreateAThread( void *ThreadStartAddress, int *data ) { intReturnCode; pthread_t Thread; pthread_attr_t Attribute; ReturnCode = pthread_attr_init( &Attribute ); if ( ReturnCode != 0 ) printf( "Error in pthread_attr_init in CreateAThread\n" ); ReturnCode = pthread_attr_setdetachstate( &Attribute, PTHREAD_CREATE_JOINABLE ); if ( ReturnCode != 0 ) printf( "Error in pthread_attr_setdetachstate in CreateAThread\n" ); ReturnCode = pthread_create( &Thread, &Attribute, ThreadStartAddress, (void *)*data ); if ( ReturnCode == EINVAL ) /* Will return 0 if successful */ printf( "ERROR doing pthread_create - The Thread, attr or schedparam is wrong\n"); if ( ReturnCode == EAGAIN ) /* Will return 0 if successful */ printf( "ERROR doing pthread_create - Resources not available\n"); if ( ReturnCode == EPERM ) /* Will return 0 if successful */ printf( "ERROR doing pthread_create - No privileges to do this schedule type\n"); ReturnCode = pthread_attr_destroy( &Attribute ); if ( ReturnCode ) /* Will return 0 if successful */ printf( "Error in pthread_mutexattr_destroy in CreateAThread\n" ); return( (unsigned int)Thread ); } // End of CreateAThread

More Related