Compare commits
	
		
			41 Commits
		
	
	
		
			android-6.
			...
			marshmallo
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5308b48c87 | ||
| 
						 | 
					1a5bfd9eaf | ||
| 
						 | 
					eebe01b523 | ||
| 
						 | 
					2010fb6722 | ||
| 
						 | 
					4f80102935 | ||
| 
						 | 
					7cfba3b057 | ||
| 
						 | 
					306ae636fd | ||
| 
						 | 
					ab900ef9d4 | ||
| 
						 | 
					f2e4f3c1fa | ||
| 
						 | 
					63265e59fa | ||
| 
						 | 
					509940238d | ||
| 
						 | 
					bad632a16a | ||
| 
						 | 
					22af16f113 | ||
| 
						 | 
					0aa018ccc0 | ||
| 
						 | 
					b97c8b4024 | ||
| 
						 | 
					2e8ac0b72c | ||
| 
						 | 
					b6b6fcfa31 | ||
| 
						 | 
					f117eb873b | ||
| 
						 | 
					89fddb56ed | ||
| 
						 | 
					b530200ef3 | ||
| 
						 | 
					d5887751b2 | ||
| 
						 | 
					2cddffe900 | ||
| 
						 | 
					04363e4437 | ||
| 
						 | 
					01c72f8c1c | ||
| 
						 | 
					0e7aca1dff | ||
| 
						 | 
					1a78032e30 | ||
| 
						 | 
					64eb843f74 | ||
| 
						 | 
					8b18a3c922 | ||
| 
						 | 
					741df2881b | ||
| 
						 | 
					9660d32e74 | ||
| 
						 | 
					2ff7422771 | ||
| 
						 | 
					3619d6b922 | ||
| 
						 | 
					2783166c35 | ||
| 
						 | 
					c3351ea94d | ||
| 
						 | 
					730c0a475c | ||
| 
						 | 
					c8e23a4c1a | ||
| 
						 | 
					4d49212a5f | ||
| 
						 | 
					aa3ef00a43 | ||
| 
						 | 
					304307243f | ||
| 
						 | 
					51d3926d8a | ||
| 
						 | 
					4cb434df9b | 
							
								
								
									
										7
									
								
								tests/pthread_test.cpp
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										7
									
								
								tests/pthread_test.cpp
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1245,8 +1245,11 @@ TEST(pthread, pthread_attr_getstack_18908062) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(__BIONIC__)
 | 
					#if defined(__BIONIC__)
 | 
				
			||||||
 | 
					static pthread_mutex_t gettid_mutex;
 | 
				
			||||||
static void* pthread_gettid_np_helper(void* arg) {
 | 
					static void* pthread_gettid_np_helper(void* arg) {
 | 
				
			||||||
 | 
					  pthread_mutex_lock(&gettid_mutex);
 | 
				
			||||||
  *reinterpret_cast<pid_t*>(arg) = gettid();
 | 
					  *reinterpret_cast<pid_t*>(arg) = gettid();
 | 
				
			||||||
 | 
					  pthread_mutex_unlock(&gettid_mutex);
 | 
				
			||||||
  return NULL;
 | 
					  return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -1257,11 +1260,15 @@ TEST(pthread, pthread_gettid_np) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  pid_t t_gettid_result;
 | 
					  pid_t t_gettid_result;
 | 
				
			||||||
  pthread_t t;
 | 
					  pthread_t t;
 | 
				
			||||||
 | 
					  pthread_mutex_init(&gettid_mutex, NULL);
 | 
				
			||||||
 | 
					  pthread_mutex_lock(&gettid_mutex);
 | 
				
			||||||
  pthread_create(&t, NULL, pthread_gettid_np_helper, &t_gettid_result);
 | 
					  pthread_create(&t, NULL, pthread_gettid_np_helper, &t_gettid_result);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pid_t t_pthread_gettid_np_result = pthread_gettid_np(t);
 | 
					  pid_t t_pthread_gettid_np_result = pthread_gettid_np(t);
 | 
				
			||||||
 | 
					  pthread_mutex_unlock(&gettid_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pthread_join(t, NULL);
 | 
					  pthread_join(t, NULL);
 | 
				
			||||||
 | 
					  pthread_mutex_destroy(&gettid_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ASSERT_EQ(t_gettid_result, t_pthread_gettid_np_result);
 | 
					  ASSERT_EQ(t_gettid_result, t_pthread_gettid_np_result);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user